www.helpdeskreloaded.com

Help Desk Reloaded : Help Desk Software Forum
It is currently Thu Sep 09, 2010 3:03 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Warning: mysql_num_rows(): supplied argument is not a valid
PostPosted: Sun Jun 01, 2008 12:57 pm 
Offline
Newbie

Joined: Sun Jun 01, 2008 12:31 pm
Posts: 1
Location: indore
:?: hi frnds
I have some error in following php codes at line no 9 please help me.
[color=blue][b]Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource[/b][/color]

[code]

<?php
require_once('clsConnect.php');
//Check User in Database
global $admin;
global $pwdadmin;
function fnUsrEnter($strSql)
{
$rs1 = mysql_query($strsql);
if(mysql_num_rows($rs1)>0)
{
while($row=mysql_fetch_array($rs1))
{
if($row['fldU_ID']=='$admin' and $row['fldPwd']=='$pwdadmin')
header("location:admlogin.php");
else
header("location:user.php");
}
}
}
global $user_tablename;
//making Connection.
if($_POST['cmdSubmit'] == 'Login')
{
$conn= new clsConnect();
$conn->fnConnect();

$sql1 ="SELECT fldU_ID, fldPwd FROM ".$user_tablename." WHERE fldU_ID='".$_POST['txtUser_Id']."' AND fldPwd='".$_POST['txtPwd']."'";
fnUsrEnter($sql1);
$conn->fnClose();
}
else
{
echo $_POST['cmdSubmit']."<br><br><table align='right' border='0' width='300' height='50' class='err'=''><br><br>
<tr><td bgcolor='#FFFFFF'>Invalid User--!<br>New User Please Sign Up---!<br></td></tr>
</table>";

}
?>

[/code]


and error is -
[color=red][b]Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\wamp\no links allowed\vblog1\userchk.php on line 9[/b][/color]


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 01, 2008 6:14 pm 
Offline
Moderator

Joined: Mon Apr 28, 2008 2:30 pm
Posts: 47
Hmm, first reactions :

This is not in the right section of the board.
And it doesn't seem to be a helpdeskreloaded file. Which means we can't help you since we do not know what the code is supposed to do.


Top
 Profile  
 
 Post subject: Reply
PostPosted: Mon Jun 02, 2008 2:00 am 
Offline
Wizard of the Help Desk

Joined: Wed Jun 21, 2006 12:08 am
Posts: 264
Location: Grand Rapids, Michigan
if mysql is not enabled in the PHP.ini and setup correctly you will get that error message. Bosjvd is correct, you should post in the problems area please.

Thank you.

H.D.R. Forum Admin


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group