PrateekSaxena Posted April 26, 2007 Share Posted April 26, 2007 Hi,I am not able to use any of the MySQL related functions such as –mysql_fetch_array — Fetch a result row as an associative array, a numeric array, or bothmysql_fetch_assoc — Fetch a result row as an associative arraymysql_fetch_field — Get column information from a result and return as an objectmysql_fetch_lengths — Get the length of each output in a resultI think it is because we did not update the php.ini file correctly, but we did not do it it was XAMPP :)It gives errors like - Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\Program Files\xampp\htdocs\my\wotchyadoin\reg\signup.php on line 19 <?php include('../com/dbinfo.php'); $con = mysql_connect($server,$username,$password); if (!$con){ die('Could not connect: ' . mysql_error()); } echo "Connection Established"; mysql_select_db($database, $con); if (!mysql_select_db($database, $con)){ echo "<br><b>No databse</b>"; } $query = "SELECT * FROM 'users' WHERE yahooid = 'prateek.saxena';"; $result = mysql_query($query,$con);; while($row = mysql_fetch_array($result)){ echo $row['username']; echo "<br />"; } mysql_close($con);?> What do I do? Link to comment Share on other sites More sharing options...
PrateekSaxena Posted April 26, 2007 Author Share Posted April 26, 2007 Ok my bad, my SQL query was failing Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.