Deoctor Posted November 18, 2009 Share Posted November 18, 2009 <?php include("access.php"); mysql_select_db($dbname); $user="ym_chaitu"; //$e=mysql_query("select email from userlogin where username='$user'"); //$email=mysql_query($e,0); $query = mysql_query("SELECT username,password FROM userlogin WHERE username = '$user'") or die(mysql_error()); $data = mysql_result($query); echo $data; ?> this is my code,,when i am using it out, it is giving me an error Warning: Wrong parameter count for mysql_result() in C:\Program Files\xampp\htdocs\chaitu\magpierss\test.php on line 8 can any one let me know where an i wrong Link to comment https://forums.phpfreaks.com/topic/181993-solved-wrong-parameter-count-for-mysql_result/ Share on other sites More sharing options...
rajivgonsalves Posted November 18, 2009 Share Posted November 18, 2009 mysql_result you have to specify the row number so it will be $data = mysql_result($query,1); you can use mysql_fetch_array instead $data = mysql_fetch_array($query); Link to comment https://forums.phpfreaks.com/topic/181993-solved-wrong-parameter-count-for-mysql_result/#findComment-959948 Share on other sites More sharing options...
Deoctor Posted November 18, 2009 Author Share Posted November 18, 2009 10q for your reply ,i resolved the query Link to comment https://forums.phpfreaks.com/topic/181993-solved-wrong-parameter-count-for-mysql_result/#findComment-959953 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.