SQl num_rows problem


Posted on 16th Feb 2014 07:03 pm by admin

when i try to count rows from an SQL select i get an warning

Code: [Select]$countviews = mysql_query("SELECT * FROM viewed WHERE sfw = '0' AND cookieid = $id");
$num_rows_viewed = mysql_num_rows($countviews);
Code: [Select]Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in ******.php on line 58
anybody an idea why this is?

No comments posted yet

Your Answer:

Login to answer
282 Like 31 Dislike
Previous forums Next forums
Other forums

re calling a function without including file
Hi,
i am new to programming in php, i was just checking the wordpress code and found out in the w

Getting number of affected rows in SQLPLUS..
Hi everyone,
I have a shell script where i am invoking sqlplus, running a query and saving t

Problem executing bash script using shell_exec
Hi there,
I created a bash script file using following code to convert doc documents to pdf using

Points for Wiki contribution
Hi everyone,

I want to know how long does it take for the moderator to award points for a

mysql_query returning boolean instead of mysql ressource
Hi,

I seem to have a weird issue with the php command mysql_query. I pass 2 arguments the que

Displaying data from database into a 2 dimensional table
Good day!

I'm a beginner in PHP and I'm not expecting a full coding for this qestion. I'm jus

Undefined index on my form
ok im getting Undefined index on this line.. print_r($_REQUEST['form']);

below is the full sc

php global variable
how can we create global variable so we can use its value in any form.. Please give example to

Spaghetti Code
So.

I've pretty much reached the point where I have so many isset s on one page that I can't

displaying unknown amount of results
I am reading a directory and getting a list of folders in the directory, I want to display the folde

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash