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

UDP server recvfrom() always returns -1? :(
Hello all,
I am getting a very strange error in my code :( I am writing a server application in C

Format timestamp from mysql
When I tried this:
Code: date("m/d/Y H:i A", $row['timestamp'])
I got 12/31/1969 18:

Multidimensional $_POST
Hello

How to get a single array from array of array (2 - dimension).
For example I have a

PHP Surveys
I really would like some advice.

If you have a client come to you asking for a survey to be d

Multiple upload and Resize
I would like some help on my script I have the for my index.php

////

<html&

sql problems
I am having a small problem with my sql statement. it is inserting into 4 of the fields.

fie

first few characters only
hi, does anyone know how to use PHP to take the first few words of a text and limit them? i have see

big pagination problem in php
<?php

$connect = mysql_connect("localhost", "root", "")

How would I convert this into code using an if statement?
ES equals exam score m equals $mean s equals $total. I already coded my mean and total so I'm not g

Syntax Help
I'm trying to make a form that edits a php file which contains config settings. I'm using strings t

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