•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 401,709 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,066 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 2162 | Replies: 1
![]() |
•
•
Join Date: Feb 2006
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
mysql_num_rows(): supplied argument is not a valid MySQL result resource in /user/690
#1
Feb 17th, 2006
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /data/9/0/24/113/676928/user/690291/htdocs/inc/_up_index1.php on line 40
This is the error i get every time when any of my php scripts try to read/write in my mysql data base.
This is _up_index1.php
[PHP]
<?
$test_act['new_tranzaction']="OK";
$test_act['tranzaction_details_started']="OK";
$test_act['tranzaction_details_pointing']="OK";
$test_act['accept_tranzaction']="OK";
$test_act['reject_tranzaction']="OK";
$test_act['tranzaction_details']="OK";
$test_act['payment']="OK";
if(!$test_act[$act]){
$act="tranzactions";
}
if(session_is_registered("valid_user")){
$act=$act;}
else{
$errormsg="";
if($do=="login"){
$sql="select * from escrow_user where user='$user' and pass=PASSWORD('$pass') LIMIT 1";
$result=mysql_query("$sql");
$n=mysql_num_rows($result); /// LINE 40
if($n==0){
$errormsg="Invalid Log In";
$title="LOG IN";
$act="login";}
else{
$rand=mysql_fetch_array($result);
$valid_user=$user;
$valid_email=$rand[email];
session_register("valid_user");
session_register("valid_email");
$title="your account";
$act=$act;}
}
else{$act="login";
$title="LOG IN";
}
}
?>
[/PHP]
I am a newbie in php so if anyone can help me fix this website it will be highly apreciate.
thanks
This is the error i get every time when any of my php scripts try to read/write in my mysql data base.
This is _up_index1.php
[PHP]
<?
$test_act['new_tranzaction']="OK";
$test_act['tranzaction_details_started']="OK";
$test_act['tranzaction_details_pointing']="OK";
$test_act['accept_tranzaction']="OK";
$test_act['reject_tranzaction']="OK";
$test_act['tranzaction_details']="OK";
$test_act['payment']="OK";
if(!$test_act[$act]){
$act="tranzactions";
}
if(session_is_registered("valid_user")){
$act=$act;}
else{
$errormsg="";
if($do=="login"){
$sql="select * from escrow_user where user='$user' and pass=PASSWORD('$pass') LIMIT 1";
$result=mysql_query("$sql");
$n=mysql_num_rows($result); /// LINE 40
if($n==0){
$errormsg="Invalid Log In";
$title="LOG IN";
$act="login";}
else{
$rand=mysql_fetch_array($result);
$valid_user=$user;
$valid_email=$rand[email];
session_register("valid_user");
session_register("valid_email");
$title="your account";
$act=$act;}
}
else{$act="login";
$title="LOG IN";
}
}
?>
[/PHP]
I am a newbie in php so if anyone can help me fix this website it will be highly apreciate.
thanks
•
•
Join Date: Jan 2006
Posts: 29
Reputation:
Rep Power: 3
Solved Threads: 0
Re: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /user/690
#2
Feb 18th, 2006
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource (PHP)
- Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in (PHP)
- Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource (PHP)
Other Threads in the PHP Forum
- Previous Thread: Php 4 And Php 5 : Comparison
- Next Thread: how to hide email recipient list


Linear Mode