TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Absolute Beginners (http://www.talkphp.com/absolute-beginners/)
-   -   Small php error! - Thank you in advance! (http://www.talkphp.com/absolute-beginners/3508-small-php-error-thank-you-advance.html)

codefreek 10-21-2008 06:19 PM

Small php error! - Thank you in advance!
 
how come i get,

Code:

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in C:\wamp\www\code\watch.php on line 12
while($row = mysql_fetch_row($result)) // line 12.

Code:

and Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\wamp\www\code\register.php on line 31
$num = mysql_num_rows($result); //line 31

right after i put in:
PHP Code:

$query sprintf(" select * from users where username = '%s'",mysql_real_escape_string($username)); 

PHP Code:

$sql sprintf("INSERT IGNORE INTO `upload` (`link`) VALUES ('%s')",mysql_real_escape_string($url)); 

Why ;S?

Thank you in advance!

codefreek 10-21-2008 07:22 PM

Fixed it my self ;)


All times are GMT. The time now is 09:25 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0