|
Posted by Hilarion on 10/19/31 11:21
>> $s_sqlT1="SELECT Town, Area, State, County FROM LocationsGB " ;
>> if ($localTest=="All")
>> {
>> $s_sqlT2 = "" ;
>> }
>> else
>> {
>> $s_sqlT2="WHERE County='".$localCounty."' AND
>> State='".$localState."' " ;
>> }
>> $s_sqlT3="GROUP BY State, Town ORDER BY State DESC, Town, Area" ;
>> $s_sqlT0=$s_sqlT1.$s_sqlT2.$s_sqlT3 ;
>
>
>
>
> You have just performed a query to the database above, but only now are
> you about to connect to the server ???
Nope. He did not perform any query. He just concatenated some texts which
happen to be the query text (which is used later AFTER connecting to SQL
and selecting DB).
>> $dbt=mysql_connect('localhost', 'rhodeisl_ft310', 'billwilson') ;
>> mysql_select_db('rhodeisl_RISC',$dbt) ;
>> $resultT=mysql_query($s_sqlT0,$dbt) ;
>>
>> At the end of this there is no information returned from the database.
>
> Not surprised really.
>
> You need to connect to the MySQL server and then select the database,
> before you can do *anything* with it.
As above.
> Google for mysql tutorial or start with the documentation at
> http://www.mysql.com/
This can be useful.
Hilarion
Navigation:
[Reply to this message]
|