Mailinglisten-Archive |
Sebastian Burg wrote:
>> wuerde es mal so probieren:
>>
>> $sql = "
>> SELECT
>> concat('<OPTION NAME=blabla>',bez,'</OPTION>') AS bez
>> FROM
>> Schulen
>> WHERE
>> land ='CH'
>> ";
>> --
>> ** Allgemeine deutschsprachige PHP-Liste: php at phpbar.de **
>> Informationen: http://www.phpbar.de
>> http://lists.phpbar.de/mailman/listinfo/php
>
>
> zusätzlich würde ich lieber schreiben
>
> $sql = "
> SELECT
> concat('<OPTION NAME=blabla>',bez,'</OPTION>') AS sel_bez
> FROM
> Schulen
> WHERE
> land ='CH'
> ";
SQL-92 hat lieber " als '. ich weiss nicht ob ' auch funktioniert, aber
standard ist es nicht.
also lieber:
$sql = 'SELECT concat("<OPTION NAME=blabla>",bez,"</OPTION>")....'
und wenn alias == spaltenname, dann kann der alias auch gleich
weggelassen werden. stören tut er aber nicht, auch wenn alias ==
spaltenname.
grüsse
beni
>
> da es meines wissens probleme gibt wenn der AS name gleich dem spalten
> name ist.
>
>
____________________________________________________________
This message may contain legally privileged or confidential
information and is therefore addressed to the named persons only.
The recipient should inform the sender and delete this message,
if he/she is not named as addressee.
The sender disclaims any and all liability for the integrity
and punctuality of this message.
The sender has activated an automatic virus scanning by
Messagelabs, but does not guarantee the virus free
transmission of this message.
php::bar PHP Wiki - Listenarchive