From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman" Newsgroups: gmane.emacs.help Subject: Re: indenting SQL in php_mode Date: Tue, 9 Dec 2008 01:10:38 +0100 Message-ID: References: <87iqpvojkw.fsf@stars.fthieme.lan> <87r64ilyan.fsf@stars.fthieme.lan> <87myf6lq9z.fsf@stars.fthieme.lan> <760E44EE-B292-4B7B-86AA-D8E43F4ADEC0@digg.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1228781479 7073 80.91.229.12 (9 Dec 2008 00:11:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 9 Dec 2008 00:11:19 +0000 (UTC) Cc: Frank Thieme , help-gnu-emacs@gnu.org To: "Ian Eure" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 09 01:12:22 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L9qD8-0007jL-A4 for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Dec 2008 01:12:22 +0100 Original-Received: from localhost ([127.0.0.1]:52507 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L9qBx-0001Vw-7m for geh-help-gnu-emacs@m.gmane.org; Mon, 08 Dec 2008 19:11:09 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L9qBX-0001Vg-Ml for help-gnu-emacs@gnu.org; Mon, 08 Dec 2008 19:10:43 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L9qBW-0001VN-Jc for help-gnu-emacs@gnu.org; Mon, 08 Dec 2008 19:10:42 -0500 Original-Received: from [199.232.76.173] (port=55655 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L9qBW-0001V1-Ca for help-gnu-emacs@gnu.org; Mon, 08 Dec 2008 19:10:42 -0500 Original-Received: from ey-out-1920.google.com ([74.125.78.145]:25200) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L9qBV-0008Ay-9Z for help-gnu-emacs@gnu.org; Mon, 08 Dec 2008 19:10:41 -0500 Original-Received: by ey-out-1920.google.com with SMTP id 4so576965eyg.24 for ; Mon, 08 Dec 2008 16:10:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=+WL9k7DfV+jkXbr6KYS0G3zWE2vKVOxxvPApbDpzYaU=; b=U45iArxLdDUf4lxSql7HR0brwTty7fhY1nLlnAnGKdUnWGkQHrLwSCK0qgi430wiUw BKdLoxMV+h+cLVKR1itolXH6bshWJhoGUWFoXWHqptYJo2QksvoIxF2w+J6JvqRTyXZ3 wxIVu6wZr5gJIuaDziiA6dQjDnxTgh9SC6z6Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=QCV0j6ax9WMny0XIANTq94IsoeM0Qok5XXDAM60N2iL4zwLv4jAr66ME9DOuRoaUaD UNNzLZLMYr08GeHodW/BJhlcjk4MBb5ZzPGJ1Giavw4w/sVnZfviPhK0A0mj7k9I/txr d79wrUVz5+sCEPBU7vDVJ3ZVH2404rMkBaE0I= Original-Received: by 10.86.80.17 with SMTP id d17mr2954854fgb.55.1228781439367; Mon, 08 Dec 2008 16:10:39 -0800 (PST) Original-Received: by 10.86.58.16 with HTTP; Mon, 8 Dec 2008 16:10:38 -0800 (PST) In-Reply-To: <760E44EE-B292-4B7B-86AA-D8E43F4ADEC0@digg.com> Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:60482 Archived-At: On Mon, Dec 8, 2008 at 6:38 PM, Ian Eure wrote: > On Dec 8, 2008, at 8:27 AM, Lennart Borgman wrote: > >> On Mon, Dec 8, 2008 at 3:01 PM, Frank Thieme wrote: >>> >>> On Mo 08 Dez 2008 14:32, "Lennart Borgman" >>> 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.