Today i have installed the phpay shop. As far as I can tell the installation completed without any errors. I can add items to the shop but when I ty to view them I get the next 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
What could this be???
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can you explain failure situation little bit more?
- If you call phPay itself no product is visible by default. So is it only one department or item group or all? Only a special item or any?
- Do you changed password of userID=2? Or deleted usergroup.ID=2? Both you shouldn't do.
- Can you find out which SQL query?
- Can I look myself your test page?
- Do you read: http://sourceforge.net/forum/forum.php?thread_id=938723&forum_id=121974
Greetings,
Andreas.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2003-11-10
Dear Andreas,
I have been looking at your questions and here are my answers:
- It only happens with items and that is "ALL" items;
- I did not change anything for user with ID/Group 2
- I found out that i get this error with this query:
$item_result = db_query("SELECT DISTINCT item.*, iteminfo.* from item, iteminfo, it_itgr WHERE (item.itemgrID='$itemgr' OR (it_itgr.itemgrID='$itemgr' AND it_itgr.itemID=item.ID)) AND iteminfo.itemID= item.ID AND iteminfo.langID='$langID' AND item.visible='1' order by item.orderby") or db_die(17);
which is located in the file main.php.
The problem occures on Apache and IIS servers. We use PHP version 4.3.4 and mysql version 4.0.13nt and higher.
-The page is located on a test server which can not be view from the "outside" :( ;
- Yes I read it.
Greetins,
Raymond.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Good answers (not all make me happy, but seem usefull ;-)
Please change function call into:
$item_result = db_query("... item.orderby", 3) or db_die(17);
Added a second argument for function db_query(); to output the query string.
You wrote 'mysql version 4.0 ...'. Maybe there is the problem. I never worked with 4.x Can you try with 3.23x somewhere?
Greetings,
Andreas.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2003-11-13
Hi,
I have added the extra argument an this is what I got:
SELECT DISTINCT item.*, iteminfo.* from item, iteminfo, it_itgr WHERE ( item.itemgrID='2' OR (it_itgr.itemgrID='2' AND it_itgr.itemID= item.ID)) AND iteminfo.itemID= item.ID AND iteminfo.langID='6' AND item.visible='1' order by item.orderby
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
I do not have a 3.23x server here but I might be able to try something but is will take some time :(
Greetings,
Raymond
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I really dont see an SQL error ... If you use this error with phpMyAdmin, what happens? Of course same error, but there you can better find out, what server means ... "near ''" error for nothing? May be there is a linebreak or similar ...
You can try to remove DISTINCT from query ... May be can try to add it_itgr.* to selected columns ...
Otherwise I have no idea ...
Greetings,
Andreas.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
Today i have installed the phpay shop. As far as I can tell the installation completed without any errors. I can add items to the shop but when I ty to view them I get the next 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
What could this be???
Can you explain failure situation little bit more?
- If you call phPay itself no product is visible by default. So is it only one department or item group or all? Only a special item or any?
- Do you changed password of userID=2? Or deleted usergroup.ID=2? Both you shouldn't do.
- Can you find out which SQL query?
- Can I look myself your test page?
- Do you read: http://sourceforge.net/forum/forum.php?thread_id=938723&forum_id=121974
Greetings,
Andreas.
Dear Andreas,
I have been looking at your questions and here are my answers:
- It only happens with items and that is "ALL" items;
- I did not change anything for user with ID/Group 2
- I found out that i get this error with this query:
$item_result = db_query("SELECT DISTINCT item.*, iteminfo.* from item, iteminfo, it_itgr WHERE (item.itemgrID='$itemgr' OR (it_itgr.itemgrID='$itemgr' AND it_itgr.itemID=item.ID)) AND iteminfo.itemID= item.ID AND iteminfo.langID='$langID' AND item.visible='1' order by item.orderby") or db_die(17);
which is located in the file main.php.
The problem occures on Apache and IIS servers. We use PHP version 4.3.4 and mysql version 4.0.13nt and higher.
-The page is located on a test server which can not be view from the "outside" :( ;
- Yes I read it.
Greetins,
Raymond.
Good answers (not all make me happy, but seem usefull ;-)
Please change function call into:
$item_result = db_query("... item.orderby", 3) or db_die(17);
Added a second argument for function db_query(); to output the query string.
You wrote 'mysql version 4.0 ...'. Maybe there is the problem. I never worked with 4.x Can you try with 3.23x somewhere?
Greetings,
Andreas.
Hi,
I have added the extra argument an this is what I got:
SELECT DISTINCT item.*, iteminfo.* from item, iteminfo, it_itgr WHERE ( item.itemgrID='2' OR (it_itgr.itemgrID='2' AND it_itgr.itemID= item.ID)) AND iteminfo.itemID= item.ID AND iteminfo.langID='6' AND item.visible='1' order by item.orderby
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
I do not have a 3.23x server here but I might be able to try something but is will take some time :(
Greetings,
Raymond
I really dont see an SQL error ... If you use this error with phpMyAdmin, what happens? Of course same error, but there you can better find out, what server means ... "near ''" error for nothing? May be there is a linebreak or similar ...
You can try to remove DISTINCT from query ... May be can try to add it_itgr.* to selected columns ...
Otherwise I have no idea ...
Greetings,
Andreas.
Solution: http://sourceforge.net/forum/message.php?msg_id=2412480