Re: Select and order by question
От | John DeSoi |
---|---|
Тема | Re: Select and order by question |
Дата | |
Msg-id | 1AEFEEC2-CEA4-414F-876A-D805EAB55544@pgedit.com обсуждение исходный текст |
Ответ на | Re: Select and order by question (<operationsengineer1@yahoo.com>) |
Список | pgsql-php |
On May 3, 2006, at 12:12 PM, <operationsengineer1@yahoo.com> <operationsengineer1@yahoo.com> wrote: > off topic, but still relevant to php sql. i'll share > something that has made my life much easier wrt sql > statements - heredocs. > > the format looks like this: > > $sSql = <<<_ESQL > > SELECT * FROM crm_events > WHERE crm_leads_id > IN (SELECT id FROM crm_leads) > AND follow_up_action!='' > ORDER BY follow_up_date asc limit 1 > > _ESQL A little shameless promotion: pgEdit will even color the heredoc string for SQL if you start your heredoc string with <<<sql. Works for <<<html also. I'll have a short article out soon that shows how you can pretty much remove all SQL from your PHP code using a simple PHP class and PostgreSQL functions. John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL
В списке pgsql-php по дате отправления: