$con=mysql_connect('localhost','root','root','findbottle')
or die('Error connecting to MySQL server');
$sql="SELECT * FROM find";
$result=mysql_query($sql,$con)
or die('Error query database');
mysql_close($con);
求解为什么这段函数老是提示出错???
提示问题出在mysql_query()那里,求大神指教,sql语句没有错...
------解决方案--------------------
mysql_select_db('库名',$con); //少了这句
$result=mysql_query($sql,$con) or die(mysql_error()); //看还报错吗