You are here: Re: html to php variable communication « PHP Language « IT news, forums, messages
Re: html to php variable communication

Posted by Hilarion on 10/09/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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация