From: "Lennart Borgman" <lennart.borgman@gmail.com>
To: "Ian Eure" <ian@digg.com>
Cc: Frank Thieme <fthieme@gmx.net>, help-gnu-emacs@gnu.org
Subject: Re: indenting SQL in php_mode
Date: Tue, 9 Dec 2008 01:10:38 +0100 [thread overview]
Message-ID: <e01d8a50812081610q18d4cbe7n708c8480af40bd81@mail.gmail.com> (raw)
In-Reply-To: <760E44EE-B292-4B7B-86AA-D8E43F4ADEC0@digg.com>
On Mon, Dec 8, 2008 at 6:38 PM, Ian Eure <ian@digg.com> wrote:
> On Dec 8, 2008, at 8:27 AM, Lennart Borgman wrote:
>
>> On Mon, Dec 8, 2008 at 3:01 PM, Frank Thieme <fthieme@gmx.net> wrote:
>>>
>>> On Mo 08 Dez 2008 14:32, "Lennart Borgman" <lennart.borgman@gmail.com>
>>> writes:
>>>
>>>> Could you please show me some examples of how sql in php look?
>>>> (Delimiters etc.)
>>>
>>> I don't know whether there is a standard, but I do it like this:
>>>
>>> $query = "SELECT field1,
>>> field2,
>>> field3
>>> FROM table1 t1,
>>> table2 t2
>>> WHERE t1.foo = t2.bar
>>> AND field1 = 'foobar'";
>>
>> Thanks, Frank, but I thoiught you meant a file with mixed php and sql
>> code, or? How does the delimiters from the php code look?
>>
> It's not like PHP-in-HTML, where there are explicit delimiters. It's just
> stored in a variable as a long string.
>
> You'd have to use the variable declaration as the delimiter and force people
> to use $sql (or whatever).
Ah, thanks, I see. This is of course possible to do, something similar
is done for style="..." in for example nxhtml-mumamo-mode. However
here it looks like something more flexible would be good. I will put
it on my todo-list.
next prev parent reply other threads:[~2008-12-09 0:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-07 19:45 indenting SQL in php_mode Frank Thieme
2008-12-08 5:57 ` Ian Eure
[not found] ` <mailman.2196.1228715850.26697.help-gnu-emacs@gnu.org>
2008-12-08 11:08 ` Frank Thieme
2008-12-08 13:32 ` Lennart Borgman
[not found] ` <mailman.2226.1228743177.26697.help-gnu-emacs@gnu.org>
2008-12-08 14:01 ` Frank Thieme
2008-12-08 16:27 ` Lennart Borgman
2008-12-08 17:38 ` Ian Eure
2008-12-09 0:10 ` Lennart Borgman [this message]
[not found] ` <mailman.2236.1228753665.26697.help-gnu-emacs@gnu.org>
2008-12-08 17:38 ` Frank Thieme
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e01d8a50812081610q18d4cbe7n708c8480af40bd81@mail.gmail.com \
--to=lennart.borgman@gmail.com \
--cc=fthieme@gmx.net \
--cc=help-gnu-emacs@gnu.org \
--cc=ian@digg.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.