On Sunday 28 January 2007 5:55 am, Jochem Maas wrote:
> > And yes, I agree that MySQL has fairly decent date manipulation routines.
> > But at work we do try for database independence when possible, so except
> > on specific projects we try to avoid it.
>
> again we differ :-) I have never bought
- Original Message -
From: "Jochem Maas" <[EMAIL PROTECTED]>
To: "Larry Garfield" <[EMAIL PROTECTED]>
Cc:
Sent: Sunday, January 28, 2007 12:55 PM
Subject: Re: [PHP] SQL Readability.. (was Re: most powerful php editor)
Larry Garfield wrote:
On
Larry Garfield wrote:
> On Saturday 27 January 2007 1:14 pm, Jochem Maas wrote:
>
query builders are alot more fiddly to get 'right' than one might
imagine, dealing with NULLs, booleans and dates for example (as Satyam
pointed out) can be a right PITA.
>>> I actually almost never us
On Saturday 27 January 2007 1:14 pm, Jochem Maas wrote:
> >> query builders are alot more fiddly to get 'right' than one might
> >> imagine, dealing with NULLs, booleans and dates for example (as Satyam
> >> pointed out) can be a right PITA.
> >
> > I actually almost never use native date types in
Larry Garfield wrote:
> On Saturday 27 January 2007 7:43 am, Jochem Maas wrote:
>> Larry Garfield wrote:
>>> I have long since given up on raw insert/update/delete statements as the
>>> syntax is all kinds nasty. These days I just do this, which is even
>>> easier and more powerful:
>>>
>>> http:/
On Saturday 27 January 2007 7:43 am, Jochem Maas wrote:
> Larry Garfield wrote:
> > I have long since given up on raw insert/update/delete statements as the
> > syntax is all kinds nasty. These days I just do this, which is even
> > easier and more powerful:
> >
> > http://www.garfieldtech.com/blo
On Sat, 2007-01-27 at 14:43 +0100, Jochem Maas wrote:
>
> also I don't really agree with the sentiment that SQL syntax is nasty,
Hear, hear :)
Cheers,
Rob.
--
..
| InterJinn Application Framework - http://www.interjinn.com |
:--
Larry Garfield wrote:
> I have long since given up on raw insert/update/delete statements as the
> syntax is all kinds nasty. These days I just do this, which is even easier
> and more powerful:
>
> http://www.garfieldtech.com/blog/simplifying-sql
>
a quick look at those funcs gives me the im
- Original Message -
From: "Larry Garfield" <[EMAIL PROTECTED]>
To:
Sent: Saturday, January 27, 2007 12:18 AM
Subject: Re: [PHP] SQL Readability.. (was Re: most powerful php editor)
I have long since given up on raw insert/update/delete statements as the
syntax is
I have long since given up on raw insert/update/delete statements as the
syntax is all kinds nasty. These days I just do this, which is even easier
and more powerful:
http://www.garfieldtech.com/blog/simplifying-sql
On Friday 26 January 2007 10:03 am, [EMAIL PROTECTED] wrote:
> My contribution
On Fri, 2007-01-26 at 12:25 -0500, [EMAIL PROTECTED] wrote:
> Strangely enough, Stut and Jochem, I DO find this more readable. Hah. I know,
> I'm insane. I have done it the way you guys proposed, using an associative
> array and using the keys and values as the columns and insert values. While
On Fri, 2007-01-26 at 16:30 +, Stut wrote:
> [EMAIL PROTECTED] wrote:
> > My contribution to the insanity.. INSERT statements made easy:
> >
> > $genericQY = "INSERT INTO MOD_LMGR_Leads ("; $genericQYvalues = " VALUES
> > (";
> > $genericQY .= " FirstName,"; $genericQYva
- Original Message -
From: "Stut" <[EMAIL PROTECTED]>
You call that readable??
$vals = array();
$vals['FirstName'] = 'John';
$vals['LastName'] = 'Smith';
$query = mysql_query(BuildInsert('MOD_LMGR_Leads', $vals));
function BuildInsert($table, $values)
{
foreach (array_keys($values)
Strangely enough, Stut and Jochem, I DO find this more readable. Hah. I know,
I'm insane. I have done it the way you guys proposed, using an associative
array and using the keys and values as the columns and insert values. While
that is what I'd call "tighter" code and when you understand what
Jon Anderson wrote:
> This may not be an option for many people, 'cause ISPs and web hosts may
> not be forward-thinking enough to install PDO or recent PHP, but...
>
> PDO can do do this in a very database independant way, without having to
> do the equivalent of "mysql_real_escape_string":
>
>
This may not be an option for many people, 'cause ISPs and web hosts may
not be forward-thinking enough to install PDO or recent PHP, but...
PDO can do do this in a very database independant way, without having to
do the equivalent of "mysql_real_escape_string":
$table = 'xyz';
$data = array(
[EMAIL PROTECTED] wrote:
My contribution to the insanity.. INSERT statements made easy:
$genericQY = "INSERT INTO MOD_LMGR_Leads ("; $genericQYvalues = " VALUES (";
$genericQY .= " FirstName,"; $genericQYvalues .= " 'John',";
$genericQY .= " LastName"; $
[EMAIL PROTECTED] wrote:
> My contribution to the insanity.. INSERT statements made easy:
>
can't stand long var names if they're not absolutely necessary (JMO).
although I follow TG's logic here I don't find it that readable, too many
dots, [double]quotes, etc for my taste.
> $genericQY = "IN
18 matches
Mail list logo