Page 2 of 2
Posted: Thu Nov 03, 2005 3:01 am
by timvw
Perhaps it's a good idea to centralize all your SQL queries in a separate file.. Similar to gettext...
Posted: Thu Nov 03, 2005 3:02 am
by raghavan20
I do agree that backticks are very important,,,I just forgot them as I was thinking more on the query format rather the query itself.
Posted: Thu Nov 03, 2005 3:38 am
by Chris Corbyn
raghavan20 wrote: It's always a pain to indent in this kind of situation in editors other than Dreamweaver where you have to use so many tabs to get the query in desired format.
Many editors will retain your indent for you. Crimson does, Zend does, Kate does...
Note: You can still use heredoc on your example, it's just that the ending delimiter needs to be right up against the margin wich can make the flow of the indentation in your code look a bit off. I agree that it doesn't look very attractive, but I still use heredoc a lot even when nested into the code, since it's just so nice to work with, esp. if you're embedding something like JavaScript into your source.
Posted: Thu Nov 03, 2005 7:40 am
by Deemo
what is the advantage of using backticks?
Posted: Thu Nov 03, 2005 7:43 am
by feyd
Deemo wrote:what is the advantage of using backticks?
you can use reserved words as column, table, and database references..
Posted: Thu Nov 03, 2005 7:47 am
by Grim...
<edit>Nothing to see here, move along please...</edit>