Current time: 11-25-2024, 11:30 AM Hello There, Guest! (LoginRegister)


Post Reply 
Coding style
Author Message
momo Offline
Junior Member
*

Posts: 148
Joined: Jun 2008
Reputation: 1
Post: #1
Coding style
I have noticed that most sql query are done like this, whitch is pretty easy to read :

$query = <<<SQL_QUERY
SELECT
alias_id, alias_name
FROM

According to ispCP documentation, shouldn't it be :
http://www.isp-control.net/documentation...ding_style

$sql = "SELECT `id`, `name` FROM `people` "
. "WHERE `name` = 'Susan' "
. "ORDER BY `name` ASC ";

(dot aligned with equal sign)


Thank you
(This post was last modified: 09-11-2008 12:48 AM by momo.)
09-11-2008 12:47 AM
Find all posts by this user Quote this message in a reply
sci2tech Away
Senior Member
****

Posts: 1,285
Joined: Jan 2007
Reputation: 23
Post: #2
RE: Coding style
This is inherited from VHCS. In time all heredoc notation will be replaced.
09-11-2008 01:06 AM
Visit this user's website Find all posts by this user Quote this message in a reply
momo Offline
Junior Member
*

Posts: 148
Joined: Jun 2008
Reputation: 1
Post: #3
RE: Coding style
sci2tech Wrote:This is inherited from VHCS. In time all heredoc notation will be replaced.

Not sure I get it.
Is the documentation wrong or <<<SQLQUERY wrong ? (or my understanding Rolleyes Smile )
09-11-2008 01:13 AM
Find all posts by this user Quote this message in a reply
sci2tech Away
Senior Member
****

Posts: 1,285
Joined: Jan 2007
Reputation: 23
Post: #4
RE: Coding style
momo Wrote:<<<SQLQUERY wrong ?
Yes "<<<SQLQUERY" is wrong". This type of notations is called HEREDOC.
09-11-2008 01:15 AM
Visit this user's website Find all posts by this user Quote this message in a reply
momo Offline
Junior Member
*

Posts: 148
Joined: Jun 2008
Reputation: 1
Post: #5
RE: Coding style
Cool Thk a lot
09-11-2008 01:23 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)