[thelist] mysql_query + php
Andrew Maynes
andrew at humanbehaviour.co.uk
Tue Feb 25 03:51:01 CST 2003
I posted that in haste it is the whole connection thing you are right
It worked when I took out "$DBName", and replaced it with ->
mysql_select_db("$DBName");
Thank you
Andrew
>To: thelist at lists.evolt.org
>>
>> mysql_connect("$DBHost","$DBUser","$DBPass");
>>
>> echo "<select name=\"CityID\" size=\"1\" class='menuForm'>";
>>
>> $result=mysql_query("$DBName","SELECT City, CityID FROM city ORDER BY City");
>
>As I said yesterday - $DBName is not initialised.
>Replace the line above with:
>$result=mysql_query('SELECT City,CityID FROM city ORDER BY City');
More information about the thelist
mailing list