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

Joomla version 1.5 is end-of-life and are no longer supported. Please use Joomla 3.x instead.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
centfresh
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Sat Jul 25, 2009 1:45 pm

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

Post by centfresh » Tue Sep 21, 2010 8:02 pm

I have a warning that comes up occasionally, usually first time click on a link - if link is clicked again it goes away the Warning reads :

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

In the address bar the link takes to an wrong link address - ...option=com_virtuemart&Itemid=134&vmcchk=1&Itemid=116 ( Itemid 134 and Itemid 116 are not valid virutemart ids)

I opened database/mysql.php in Dreamweaver and have had a look at line 344 - not being very versed in php not sure what might be going wrong. Working in Joomla 1.5.17 - MYSQL 5.0.91 with Virtuemart.

I have read a lot of discussion about this function not actually working in Joomla - dunno if that's for older versions though. Someone said 'have you run Install.sql from the original package (by that I guess they mean Joomla)...

I have turned off warning in global configurations and still have error - is there some way of adding some code so the warning does not appear??? Please Help - been trying different solutions for weeks now!!! Might this be an issue using
Thanks :( :( :(

User avatar
dpacadmin
Joomla! Champion
Joomla! Champion
Posts: 6029
Joined: Sat Aug 16, 2008 1:46 pm
Location: the Bat Cave
Contact:

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

Post by dpacadmin » Tue Sep 21, 2010 9:01 pm

There was a problem with some upgrade files set for 1.5.17 not being complete. After backing up your site(Akeeba Backup) you could try uploading the complete file set for Joomla 1.5.20(except the installation folder) and overwrite your existing files. Check your FTP log to be sure all files are uploaded.

centfresh
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Sat Jul 25, 2009 1:45 pm

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

Post by centfresh » Tue Sep 21, 2010 11:46 pm

Thanks for the advise dpacadmin - I installed JOomla using Fantastico via control panel - I notice it does have the upgrade - would it not be best to upload the upgrade using this - and skip installing the installation folder when prompted to overwrite? I've not done this before so nervous - previously sites I have upgraded have not had large (virtuemart) database - and don't want to mess things up, reading some things in the forum about upgrading there seems to be some issues with modules and components not working so well..I have backup available via control panel - I don't know Akeeba it looks good but if I can get around using back up via control panel would it not be okay??? Advise much appreciated!

User avatar
dpacadmin
Joomla! Champion
Joomla! Champion
Posts: 6029
Joined: Sat Aug 16, 2008 1:46 pm
Location: the Bat Cave
Contact:

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

Post by dpacadmin » Tue Sep 21, 2010 11:58 pm

The Control Panel backup may only backup your site's files, not its database. With out the database you have no site. Akeeba Backup does both.
Just doing the upgrade with Fantastico may not fix your site as it may not replace the file(s) that are missing or corrupt and causing your problem.

Typically upgrade problems are caused by files being corrupted or not transferred during FTP to the site. If you have cPanel you can avoid this by FTP'ing the tar version of the full file set to the root of your site, then use cPanel to extract the tar file over your site. You then need to delete the installation folder it adds and the tar file.

This could also be a problem with your virtuemart install, you might want to first check their forum to see if anyone has posted this error and if they fixed it in virtuemart.

One other note, people have had corrupt configuration.php files because they opened and edited them in DreamWeaver. I wouldn't trust it for editing your php files. I use Notepad2 for that.

centfresh
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Sat Jul 25, 2009 1:45 pm

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

Post by centfresh » Wed Sep 22, 2010 7:25 am

The links and site were working fine up until uploaded full product catalogue to virtuemart via CSV - the links that are broken are coming from only one menu ( swfree generated menu) the menu was in place with links to previous virtuemart categories that no longer exist as have been deleted and new ones added - the links were then updated in the menu in joomla admin - changing the categories. Might this be causing the problem??? I want to make sure to explore all possibilities before backing up and installing new versions of joomla and virtuemart. Some changes were made to one or two PHP files but the error was coming up before which leads me to thinking it has something to do with deleted virtuemart categories/products....Great to have your expertise on this - really appreciated but I am still confused :'(

User avatar
dpacadmin
Joomla! Champion
Joomla! Champion
Posts: 6029
Joined: Sat Aug 16, 2008 1:46 pm
Location: the Bat Cave
Contact:

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

Post by dpacadmin » Wed Sep 22, 2010 10:22 am

I haven't use Virtuemart enough to know if that could cause your problem but I would go through their forum and see if it has been posted there first. It could be there was an error in your csv file that was uploaded to your database and is causing the error or perhaps the upload was incomplete or corrupted. This may have happened to others and may be posted on their forum.
http://forum.virtuemart.net/


Locked

Return to “Migrating and Upgrading to Joomla! 1.5”