Hi All,
Can anyone please help me here?
I created one php file. My code is :
<?php
$conn = mysql_connect("localhost","manish","manish","my_db");
if (empty($conn))
{
die("mysql_connect failed ". mysql_connect_error());
}
print "connected to ". mysql_get_host_info($conn);
$result = $conn->query("SELECT id from test_manish",mysql_use_result);
while($row = $result->fetch_row())
{
Print $row[0]. "<br\n>";
}
$result->free();
mysql_close($conn);
?>
I am receiving below error :
connected to localhost via TCP/IP
Fatal error: Call to a member function query() on a non-object in C:\webroot\database1.php on line 10
..
Please let me know what is wrong with this code?