I've installed phPay successfully (I think) but I can't get it to show the items when I go to Demo Shop. The Departments and Groups work OK but when I try to expand a group to look at the individual items I get the following error message:
"You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1"
Any SQL in the database was written by phPay when I installed it. Where do I start to look for the error? Line 1 of what query?
Steve
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Please try first, if search works without an error.
If yes, you have to start in main.php. There is something like "SELECT ... FROM item ..."
If search also returns an SQL-error, you should start with limit_navi* This file is used from main.php and search.php, if more items found then value of $view_limit. $view_limit (items per page) you HAVE TO set in configuration.
phPay's function db_query can output a given query, when second argument is 3:
db_query($sql_query, 3);
So you can see after which query error appears.
Also you can add an argument to db_die(),
i.e. __FILE__.__LINE__
They containPHP-file and line. On SQL-error db_die() outputs this argument.
Greetings,
Andreas.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've installed phPay successfully (I think) but I can't get it to show the items when I go to Demo Shop. The Departments and Groups work OK but when I try to expand a group to look at the individual items I get the following error message:
"You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1"
Any SQL in the database was written by phPay when I installed it. Where do I start to look for the error? Line 1 of what query?
Steve
Which 'Line 1' is a good question ...
Please try first, if search works without an error.
If yes, you have to start in main.php. There is something like "SELECT ... FROM item ..."
If search also returns an SQL-error, you should start with limit_navi* This file is used from main.php and search.php, if more items found then value of $view_limit. $view_limit (items per page) you HAVE TO set in configuration.
phPay's function db_query can output a given query, when second argument is 3:
db_query($sql_query, 3);
So you can see after which query error appears.
Also you can add an argument to db_die(),
i.e. __FILE__.__LINE__
They containPHP-file and line. On SQL-error db_die() outputs this argument.
Greetings,
Andreas.
Thanks for the reply.
Search is not working -- it gives me the same error message.
Where do I set $view_limit?
Steve
Sorry -- I misunderstood. I've set iterms/page in the config section of admin and now it's working fine.
Steve