Dear Sir,
I have following codes
<?php
mysql_connect("localhost", "root", "") or die("Connection failed! " . mysql_error());
mysql_select_db("asia");
echo "Connection successful!";
$find_query = "select *FROM ghee where sno=3";
$strSQL = mysql_query($find_query);
// Execute the query (the recordset $rs contains the result)
$rs = mysql_query($strSQL);
// Loop the recordset $rs
// Each row will be made into an array ($row) using mysql_fetch_array
while($row = mysql_fetch_array($rs)) {
// Write the value of the column FirstName (which is now in the array $row)
echo $row['pack'] . "<br />";
}
mysql_close();
?>
It show error message show in attachment
( ! ) Warning: mysql_query() expects parameter 1 to be string, resource given in C:\wamp\www\find.php on line 8
Call Stack
Time Memory Function Location
1 0.0780 141360 {main}( ) …\find.php:0
2 0.4836 149584 mysql_query ( )
…\find.php:8
( ! ) Warning: mysql_fetch_array() expects parameter 1 to be resource, null given in C:\wamp\www\find.php on line 11
Call Stack
Time Memory Function Location
My table structure can be seen in attachment
Please help me to get rid of both error messages