I don't know firebirdSQL, but every other version of SQL (and this is
how the SQL92 spec. has it) I've ever used uses the syntax described
by villas:

DELETE FROM table WHERE conditions.


On Jan 24, 12:31 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> this is not correct SQL, it should be:
> DELETE "CURRENCY" FROM "CURRENCIES" AS "CURRENCY" WHERE
> "CURRENCY"."ID"
>
> so I'm guessing the line in dbo_source.php should be:
>
> return "DELETE {$alias} FROM {$table} {$this->alias} AS {$alias}
> {$joins}
> {$conditions}";
>
> Does this fix the problem as well? If so, you should probably change
> it to that, as a $conditions array will likely cause it to bomb again
> without AS {$alias}, since CakePHP will try to use the alias
> "CURRENCY" on any conditions instead of using the actual table name
> "CURRENCIES".
>
> On Jan 23, 4:21 pm, villas <[EMAIL PROTECTED]> wrote:
>
> > Cake 1.2 beta WindowsXP  FirebirdSQL  Code baked
>
> > I notice on deleting a record I get a SQL error
> > e.g.
> > DELETE "CURRENCY" FROM "CURRENCIES" "CURRENCY" WHERE
> > "CURRENCY"."ID" ...
>
> > Is this SQL correct -- why does the second word exist? ("CURRENCY"),
> > shouldn't it just be Delete From CURRENCIES....
>
> > I notice that everything seems to be OK if I edit dbo_source.php  and
> > comment out the first {alias} in this line:
>
> > return "DELETE {$alias} FROM {$table} {$this->alias}{$alias} {$joins}
> > {$conditions}";
>
> > ...maybe it's just a FirebirdSQL thing?
>
> > If it's a bug I could report it,  but I would appreciate advice
> > because I am often wrong about these things :-)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to