If I send any authorized value (from the info popup) in the "order" field I get a MySQL error
Warning: [mysql error 1064] 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 'RAND()' at line 8
SELECT id
FROM images i
INNER JOIN image_category ic ON id=ic.image_id
INNER JOIN image_tag it ON id=it.image_id
WHERE tag_id IN (72)
AND (category_id NOT IN (9,10,11,12,13,18,28,65,66,67,48,50,71) AND level<=0)
GROUP BY id
RAND() in /home/sys/var/www/piwigo.org/demo/include/dblayer/functions_mysqli.inc.php on line 830
Fatal error: Call to a member function fetch_assoc() on a non-object in /home/sys/var/www/piwigo.org/demo/include/dblayer/functions_mysqli.inc.php on line 891
**Reported by Epy on 15 Mar 2015 15:26**
**Version:** 2.7.4
Hi,
I was playing with webservices with a python script and web UI here: http://piwigo.org/demo/tools/ws.htm#top
when I got this error:
If I send any authorized value (from the info popup) in the "order" field I get a MySQL error
Warning: [mysql error 1064] 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 'RAND()' at line 8
SELECT id
FROM images i
INNER JOIN image_category ic ON id=ic.image_id
INNER JOIN image_tag it ON id=it.image_id
WHERE tag_id IN (72)
AND (category_id NOT IN (9,10,11,12,13,18,28,65,66,67,48,50,71) AND level<=0)
GROUP BY id
RAND() in /home/sys/var/www/piwigo.org/demo/include/dblayer/functions_mysqli.inc.php on line 830
Fatal error: Call to a member function fetch_assoc() on a non-object in /home/sys/var/www/piwigo.org/demo/include/dblayer/functions_mysqli.inc.php on line 891
**Steps to reproduce:** Go to: http://piwigo.org/demo/tools/ws.htm
Choose pwg.tags.getImages on the left
Enter a tag id (e.g. 72 'Weather')
Enter an order for sorting from the info button, for example 'random' or 'date_creation'
Select "Invoke", you'll get the error in result frame
**Additional information:** I don't have a gallery right now, so I just played with the demo one and didn't try another
That's why I don't have any information on webserver software versions or piwigo version
[Piwigo Bugtracker #3211](http://piwigo.org/bugs/view.php?id=3211)
<!-- github-sync-id:97252309 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Reported by Epy on 15 Mar 2015 15:26
Version: 2.7.4
Hi,
I was playing with webservices with a python script and web UI here: http://piwigo.org/demo/tools/ws.htm#top
when I got this error:
If I send any authorized value (from the info popup) in the "order" field I get a MySQL error
Warning: [mysql error 1064] 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 'RAND()' at line 8
SELECT id
FROM images i
INNER JOIN image_category ic ON id=ic.image_id
INNER JOIN image_tag it ON id=it.image_id
WHERE tag_id IN (72)
AND (category_id NOT IN (9,10,11,12,13,18,28,65,66,67,48,50,71) AND level<=0)
GROUP BY id
RAND() in /home/sys/var/www/piwigo.org/demo/include/dblayer/functions_mysqli.inc.php on line 830
Fatal error: Call to a member function fetch_assoc() on a non-object in /home/sys/var/www/piwigo.org/demo/include/dblayer/functions_mysqli.inc.php on line 891
Steps to reproduce: Go to: http://piwigo.org/demo/tools/ws.htm
Choose pwg.tags.getImages on the left
Enter a tag id (e.g. 72 'Weather')
Enter an order for sorting from the info button, for example 'random' or 'date_creation'
Select "Invoke", you'll get the error in result frame
Additional information: I don't have a gallery right now, so I just played with the demo one and didn't try another
That's why I don't have any information on webserver software versions or piwigo version
Piwigo Bugtracker #3211
Comment posted by Epy on 16 Mar 2015 09:53
(Sorry, I didn't see the first bug report when I searched)
Hi, i confirm this bug.This request :
http://XXXXXX.piwigo.com/ws.php?tag_id=&per_page=3&page=0&tag_name=Homepage&order=random&method=pwg.tags.getImages&format=php
return nothing :(
Corrected more than a year ago in commit
2b58912b96