|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-07-27 20:28 UTC] jalal@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 10 23:00:01 2026 UTC |
---------------------------------------------------------------------------- $conn = mysql_connect( 'localhost','infoline','xxxxx'); if (!$conn) print "Error connecting"; $res = mysql_select_db('egg',$conn); if (!$res) print "Error changing database"; $conn2 = mysql_connect( 'localhost','infoline','xxxxx'); if (!$conn2) print "Error connecting"; $res2 = mysql_select_db('infosat',$conn2); if (!$res2) print "Error changing database"; $query = 'select * from sat_connections'; $result = mysql_query($query,$conn); if (!$result) print 'Error doing SQL query: '.mysql_error(); ----------------------------------------------------- The result of all this is an error: Error doing SQL query: Table 'infosat.sat_connections' doesn't exist which is true. sat_connections exists in the database 'egg', but not in the database 'infosat'. This probably means that mysql_query() always queries the last opened connection, unlike what the documentation states. Please note that I am using the first release of PHP4, which does not appear as an option above. I don't currently have access to the list of compiled modules, etc., but I suspect this is a general problem. If this is not the case, please mail me and I will get hold of further info.