Why the brackets/single-quotes around tables and columns?

2011-11-01 Thread Yves S. Garret
] AS [Post] WHERE 1 = 1 Why the brackets? When I'm connecting to a MySQL database, I get single-quotes. SELECT `Post`.`id`, `Post`.`title`, `Post`.`body`, `Post`.`created`, `Post`.`modified` FROM `posts` AS `Post` WHERE 1 = 1 Why the single quotes for a MySQL DB? -- Our newest site

Re: Why the brackets/single-quotes around tables and columns?

2011-11-01 Thread Jeremy Burns | Class Outfit
the following output at the bottom of my page. SELECT [Post].[id], [Post].[title], [Post].[body], [Post].[created], [Post].[modified] FROM [posts] AS [Post] WHERE 1 = 1 Why the brackets? When I'm connecting to a MySQL database, I get single-quotes. SELECT `Post`.`id`, `Post`.`title`, `Post

Re: Why the brackets/single-quotes around tables and columns?

2011-11-01 Thread mark_story
To be a nitpick, those are backticks not single quotes. Identifier quoting is different in every database vendor. So Cake adjusts accordingly. -Mark On Nov 1, 11:16 am, Yves S. Garret yoursurrogate...@gmail.com wrote: I'm connecting to an MS-SQL database.  And, although I can't show you

Re: Why the brackets/single-quotes around tables and columns?

2011-11-01 Thread Ryan Schmidt
up as a reserved word later. So that's why CakePHP does that for you. On Nov 1, 2011, at 11:07, mark_story wrote: To be a nitpick, those are backticks not single quotes. Identifier quoting is different in every database vendor. So Cake adjusts accordingly. -- Our newest site

Re: Single Quotes

2011-07-09 Thread Prabha Vathi
['content']),0,20). ..., 'class' = 'agrizlink') ); It displays #38; like this for single quotes. echo $this-Html-link( e(substr($post_array['content'],0,75)), array( 'controller' = 'control

Re: Single Quotes

2011-07-08 Thread Davor Ilic
', 'action' = 'view' ), array('title' = substr(stripslashes($post_array['content']),0,20). ..., 'class' = 'agrizlink') ); It displays #38; like this for single quotes. echo $this-Html-link( e(substr($post_array

Re: Single Quotes

2011-07-07 Thread Prabha Vathi
' = substr(stripslashes($post_array['content']),0,20). ..., 'class' = 'agrizlink') ); It displays #38; like this for single quotes. echo $this-Html-link( e(substr($post_array['content'],0,75)), array( 'controller' = 'control

Re: Single Quotes

2011-07-07 Thread Jeremy Burns | Class Outfit
( 'controller' = 'control', 'action' = 'view' ), array('title' = substr(stripslashes($post_array['content']),0,20). ..., 'class' = 'agrizlink') ); It displays #38; like this for single

Re: Single Quotes

2011-07-02 Thread Miles J
I stand corrected! On Jul 1, 2:07 am, euromark dereurom...@googlemail.com wrote: i knew it :) On 1 Jul., 04:02, mark_story mark.st...@gmail.com wrote: h() isn't being deprecated or removed.  neither is am().  Both actually provide some utility above and beyond simple aliasing.

Re: Single Quotes

2011-07-01 Thread euromark
i knew it :) On 1 Jul., 04:02, mark_story mark.st...@gmail.com wrote: h() isn't being deprecated or removed.  neither is am().  Both actually provide some utility above and beyond simple aliasing. However, methods like r(), up(), e() and low() have already been removed from 2.0.  h() however

Single Quotes

2011-06-30 Thread Prabha Vathi
Hi, addslashes(Sanitize::html($this-data['Post']['content'],array('remove' = true))); This is the line I have before saving the record. But single quotes becomes #039; What have i done wrongly? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out

Re: Single Quotes

2011-06-30 Thread euromark
))); This is the line I have before saving the record. But single quotes becomes #039; What have i done wrongly? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related

Re: Single Quotes

2011-06-30 Thread Miles J
Jun., 10:24, Prabha Vathi prabha.ridd...@gmail.com wrote: Hi, addslashes(Sanitize::html($this-data['Post']['content'],array('remove' = true))); This is the line I have before saving the record. But single quotes becomes #039; What have i done wrongly? -- Our newest site

Re: Single Quotes

2011-06-30 Thread Ryan Schmidt
On Jun 30, 2011, at 14:13, Miles J wrote: h() is being deprecated in later versions Oh? By later versions I assume you mean CakePHP 2? If so, what are we being recommended to use instead? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new

Re: Single Quotes

2011-06-30 Thread euromark
well, i dont care^^ its about the most important function ever so if that was actually the case (which i highly doubt due to its importance) later on i would simply but the same function in my bootstrap On 30 Jun., 21:43, Ryan Schmidt google-2...@ryandesign.com wrote: On Jun 30, 2011, at

Re: Single Quotes

2011-06-30 Thread Miles J
I think it was supposed to be 1.3, but most likely 2.0 now. Any of these convenience functions like h() or r() are removed. On Jun 30, 12:43 pm, Ryan Schmidt google-2...@ryandesign.com wrote: On Jun 30, 2011, at 14:13, Miles J wrote: h() is being deprecated in later versions Oh? By later

Re: Single Quotes

2011-06-30 Thread euromark
some convenience functions do make sense to get rid of but not h() -1 from me On 30 Jun., 22:32, Miles J mileswjohn...@gmail.com wrote: I think it was supposed to be 1.3, but most likely 2.0 now. Any of these convenience functions like h() or r() are removed. On Jun 30, 12:43 pm, Ryan Schmidt

Re: Single Quotes

2011-06-30 Thread Miles J
They are being removed because they are slower than the original counter-parts. But like you said, you can place them yourselves if they get removed :P On Jun 30, 1:44 pm, euromark dereurom...@googlemail.com wrote: some convenience functions do make sense to get rid of but not h() -1 from me

Re: Single Quotes

2011-06-30 Thread Olaf Reitmaier Veracierta
Modify HTMLHelper.php as said by Mile J and include the function h() code. On Thu, Jun 30, 2011 at 3:13 PM, Ryan Schmidt google-2...@ryandesign.comwrote: On Jun 30, 2011, at 14:13, Miles J wrote: h() is being deprecated in later versions Oh? By later versions I assume you mean CakePHP 2?

Re: Single Quotes

2011-06-30 Thread euromark
i highly doubt that you get any significant speed improvements out of that even if you use it 1000 times on a single page (which you simply cannot) as the view/output is compared to the huge framework itself the smaller part of the puzzle. anyway most people should be made aware of those basic

Re: Single Quotes

2011-06-30 Thread euromark
did i just write thread? i guess you all know what it is supposed to read^^ bedtime for me now On 30 Jun., 23:56, euromark dereurom...@googlemail.com wrote: i highly doubt that you get any significant speed improvements out of that even if you use it 1000 times on a single page (which you

Re: Single Quotes

2011-06-30 Thread Jamie
You could, you know, use htmlspecialchars() - that's all h() is. Not the end of the world, and it certainly makes the code more clear (h? wtf is h?). On Jun 30, 1:44 pm, euromark dereurom...@googlemail.com wrote: some convenience functions do make sense to get rid of but not h() -1 from me

Re: Single Quotes

2011-06-30 Thread euromark
a) no, because h automatically sets the correct charset internally b) its so much shorter. which a lot of concernated strings this is hell to work with thats WHY there were conv. functions in the first place wtf is htmlspecialchars? why ever not hypertextMarkupLanguageSpecialchars()?^^ On 1

Re: Single Quotes

2011-06-30 Thread mark_story
h() isn't being deprecated or removed. neither is am(). Both actually provide some utility above and beyond simple aliasing. However, methods like r(), up(), e() and low() have already been removed from 2.0. h() however will stick around. -Mark On Jun 30, 5:12 pm, Miles J