[thelist] PHP function problem

Bill Bejeck bethbejeck at earthlink.net
Fri Mar 1 13:18:01 CST 2002


I'm trying to select a database with mysql_select_db("database") but instead
use a variable, that was defined with the database name earlier in the code,
so it looks like :

$db="name";

 mysql_select_db($db) ;
 $query="SELECT * form some_table" ;
 $result=mysql_query($query);

but $result is blank and I get error messages saying $result is not a valid
MySQL value.  If I put in the actual database name i.e ("name") the code
works fine.  Any suggestions?

Thanks,
Bill




More information about the thelist mailing list