Warning: mysql_num_rows(): supplied argument is not a valid

Phoca Gallery - image gallery extension
Viper786
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 22 Mar 2011, 23:45

Warning: mysql_num_rows(): supplied argument is not a valid

Post by Viper786 »

I have Joomla 1.6 and downloaded the 1.6 package. I just installed it and since I didn't have it installed before, I clicked Install instead of Upgrade.

Once it was installed, I went to create a category but got this message up top:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/xxxx/public_html/adil/libraries/joomla/database/database/mysql.php on line 317

I googled this issue and found it is common and came across this site: https://www.phoca.cz/documents/2-phoca-g ... em-solving

I opened up my database through PHPMYADMIN and the tables were there. Just to be on the safe side, I dropped them and recreated them using the sql file in the installation package but came across the exact same issue again.

Any help? Again, this is for Joomla 1.6 and the file I downloaded is "com_phocagallery_v3.0.0_rc4.zip" for joomla 1.6
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Warning: mysql_num_rows(): supplied argument is not a va

Post by Jan »

Hi, enable debug mode to get more info from database.

Jan
If you find Phoca extensions useful, please support the project
ArthurHick
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 27 Mar 2011, 20:46

Re: Warning: mysql_num_rows(): supplied argument is not a va

Post by ArthurHick »

Hi Jan

I have the exact same error message, I recreated all the tables also and then ran debug mode as suggested, I get this error message in debug mode, when going phoca gallery --> tab categories.

500 - An error has occurred.

JDatabaseMySQL::query: 1267 - Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '=' SQL=SELECT a.*,l.title AS language_title,uc.name AS editor,ag.title AS access_level,c.title AS parentcat_title, c.id AS parentcat_id,ua.id AS userid, ua.username AS username, ua.name AS usernameno,v.average AS ratingavg,cc.countid AS countid FROM `jos_phocagallery_categories` AS a LEFT JOIN `jos_languages` AS l ON l.lang_code = a.language LEFT JOIN jos_users AS uc ON uc.id=a.checked_out LEFT JOIN jos_viewlevels AS ag ON ag.id = a.access LEFT JOIN jos_phocagallery_categories AS c ON c.id = a.parent_id LEFT JOIN jos_users AS ua ON ua.id = a.owner_id LEFT JOIN jos_phocagallery_votes_statistics AS v ON v.catid = a.id LEFT JOIN (SELECT cc.parent_id, count(*) AS countid FROM jos_phocagallery_categories AS cc GROUP BY cc.parent_id ) AS cc ON a.parent_id = cc.parent_id GROUP BY a.id ORDER BY a.title asc

I have no idea from the above what needs to be fixed to get com_phocagallery_v3.0.0_rc4.zip" running on Joomla 1.6.1.

Please advise if you can help.

Regards,

Arthur
rolmar
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 29 Mar 2011, 23:41

Re: Warning: mysql_num_rows(): supplied argument is not a va

Post by rolmar »

I went in to PHPMYADMIN and changed all utf8_general_ci to utf8_unicode_ci for the Phoca gallery tables.
This eliminated the error, at least from showing
Hope this helps
ArthurHick
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 27 Mar 2011, 20:46

Re: Warning: mysql_num_rows(): supplied argument is not a va

Post by ArthurHick »

Thank you, changing utf8_general_ci to utf8_unicode_ci for all the phoca tables worked. Perhaps the installation file should be changed to do this on a new install to avoid this error in a Joomla 1.6 installation.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Warning: mysql_num_rows(): supplied argument is not a va

Post by Jan »

Hi, this is not set by Phoca installation, this is set in your database. Phoca doesn't set or change it anywhere.

Jan
If you find Phoca extensions useful, please support the project
Post Reply