You are here: Re: query ok but no parsing ? « All PHP « IT news, forums, messages
Re: query ok but no parsing ?

Posted by Veikko Mδkinen on 06/17/05 18:01

The Legend wrote:
> solved this just a second ago watch the change in the html en sql code at
> the alias part , i did not use alias signs from the original tables but used
> original column names instead and did just the same in the html code
>

>
> I could remember something about [m.&] interpreted wrong by html or
> processing code so after i left out the alias, the parsing was done.
>
> The only thing i am worrying about is the concistency of the variables
> parsed when i used this code without aliasing column/table names
>

Even though you say "select t.foo, t2.bar from my table1 t join table2
t2" in sql, the result set will have column names without table prexif
(t and t2 in this case). So you can use $result['foo'] to get to them.
Only if your tables have columns with a same name, you need to use alias
"select t.foo as foo1, t2.foo as foo2 ...".

Other thing: always use quote around array keys. $result[key] makes the
compiler try to find a constant named "key". This can cause conflicts if
you have actuallu defined a constant by that name and gives also some
overhead (minimal but still).

Last thing: please write your replys below the text your are quoting or
answering to. Top-posting makes question-answer threads hard to follow.


-veikko

--
veikko
mail@ .com
makinen

 

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

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация