I had encountered the following error upon submission of a new sub-category:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/site/public_html/classes/database.php on line 108
Performing query: SELECT COUNT(id) FROM wsnlinks_membergroups WHERE 1=1 ;
Performing query: SELECT title FROM wsnlinks_membergroups WHERE id=1 ;
Performing query: SELECT title FROM wsnlinks_membergroups WHERE id=2 ;
Performing query: SELECT title FROM wsnlinks_membergroups WHERE id=3 ;
Performing query: SELECT parent FROM wsnlinks_categories WHERE alias= ORDER BY id ASC ;
Number of rows is for 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 'ORDER BY id ASC' at line 1
Performing query: SELECT COUNT(id) FROM wsnlinks_categories WHERE isalbum=0 AND deleted=0 AND moderators LIKE '%, 2[,]%' ;
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 'ORDER BY id ASC' at line 1
Where can I correct the query where the "WHERE alias=" is empty?
I can't reproduce any problem. Give me a prodcedure -- are you guest or admin, is the category selector switched on or off, are you selecting something specific for particular fields (such as secondary categories)?
Comments on Database error when add sub-category
Beginner
Usergroup: Customer
Joined: Sep 04, 2006
Total Topics: 4
Total Comments: 5
Hi Paul,
I had encountered the following error upon submission of a new sub-category:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/site/public_html/classes/database.php on line 108
Performing query: SELECT COUNT(id) FROM wsnlinks_membergroups WHERE 1=1 ;
Performing query: SELECT title FROM wsnlinks_membergroups WHERE id=1 ;
Performing query: SELECT title FROM wsnlinks_membergroups WHERE id=2 ;
Performing query: SELECT title FROM wsnlinks_membergroups WHERE id=3 ;
Performing query: SELECT parent FROM wsnlinks_categories WHERE alias= ORDER BY id ASC ;
Number of rows is for 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 'ORDER BY id ASC' at line 1
Performing query: SELECT COUNT(id) FROM wsnlinks_categories WHERE isalbum=0 AND deleted=0 AND moderators LIKE '%, 2[,]%' ;
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 'ORDER BY id ASC' at line 1
Where can I correct the query where the "WHERE alias=" is empty?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
I can't reproduce any problem. Give me a prodcedure -- are you guest or admin, is the category selector switched on or off, are you selecting something specific for particular fields (such as secondary categories)?
Beginner
Usergroup: Customer
Joined: Sep 04, 2006
Total Topics: 4
Total Comments: 5
Ok, I tested using Admin, a Normal user login or Guest, all encountered the same error.
Switches for category views Off, Show subcategories on main page On, Category selector on 'Suggest Link' page Off.
I'm attempting to submit Level 2 subcategory under Level 0 Top cat -> Level 1 cat ->New Category.
The error appeared if user does not enter any fields in the form and attempt to submit.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Fixed. -> in suggest.php.