Jump to content

What's wrong with my query ?


Rommeo

Recommended Posts

I have 'pages' table;

 

id | mypageid |content | etc..

1 | contact | e mail me | ...

 

my query is :

		
<?php
$query = "SELECT * FROM pages WHERE mypageid = '$mypageid'";
$result = mysql_query($query) || die(mysql_error());
$total = mysql_num_rows($result);
?>

I m always getting this error message :

 

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in

 

What's wrong with my query ?

 

Link to comment
https://forums.phpfreaks.com/topic/222693-whats-wrong-with-my-query/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.