where is the error in a query performed with php in this script?
<?php
@ $db=mysql_pconn ect('localhost' , 'database_name' , 'password');
if (!$db)
{
echo 'conneciton eror';
exit;
}
else
{
echo 'connection on!';
}
mysql_select_db ('books'); //books: table created previously.
$query="select * from orders"; //orders: a table that i have
previosly created.
$result=mysql_q uery($query);
$num_results=my sql_num_rows($r esult);
if ($num_results = 0)
{
echo'<br><br>no thing to dispaly';
}
else
{
echo'<br><br>he re are the results: $num_results';
}
?>
<?php
@ $db=mysql_pconn ect('localhost' , 'database_name' , 'password');
if (!$db)
{
echo 'conneciton eror';
exit;
}
else
{
echo 'connection on!';
}
mysql_select_db ('books'); //books: table created previously.
$query="select * from orders"; //orders: a table that i have
previosly created.
$result=mysql_q uery($query);
$num_results=my sql_num_rows($r esult);
if ($num_results = 0)
{
echo'<br><br>no thing to dispaly';
}
else
{
echo'<br><br>he re are the results: $num_results';
}
?>
Comment