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

Fetching META TAGS through
Hello everybody
I want to fetch meta tags of a domain.
It will be done from following code of

Error: SQL Syntax; Line 1
Code:

<?php require "global_settings.php"; ?>
<title&g

IIS7 and getimagesize() problem
I have just discovered after hrs of trying to fix a problem where it's coming from. It's to do with

Pls help with PHP
Pls can anyone direct me on how to create a user account for a customer. For example i want know if

filesize problem
i use ubuntu 9.10 and i have mountet a folder from an windows

/mount/FOLDER
/mount/FOLDER/

mysql_real_escape_string
Let me preface this that I am very much a PHP noob, but I have some SQL training (not necessarily My

PHP4 to PHP5 Conversion
Hi Everyone,

I am working on a site that is built up on PHP4 and each page is being started f

Internal Server Error issues
This has been bothering me for weeks and I've been trying to solve it without asking for help, but e

I need to increse 6hours more, and i don't know how???
I need to increse 6hours more, and i don't know how???
<tr>
<t

DELETE rows based on content
I have a link in my rows

$bit="http://bit.ly/abcd";
$query = mysql_query("D

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