![]() |
|
|
|||||||
![]() |
|
|
Thread Tools | Rate Thread |
|
|
PM User | #1 |
|
New Coder ![]() Join Date: Aug 2004
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
delete from multiple tables with join ?
Code:
$queryDelete = " DELETE FROM table1,table2 WHERE table1.id=".$_GET['id']." AND table2.id=".$_GET['id']; any clues ? |
|
|
|
|
|
PM User | #2 |
|
Regular Coder ![]() Join Date: Oct 2002
Posts: 379
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
Read the documentation.
PHP Code:
__________________
Strategy Conscious |
|
|
|
|
|
PM User | #3 |
|
New Coder ![]() Join Date: Aug 2004
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
Hmmmm.........still doesnt work.
PHP Code:
Thank you ! Last edited by tdmf; 01-20-2005 at 01:04 PM.. |
|
|
|
|
|
PM User | #4 |
|
Regular Coder ![]() Join Date: Oct 2002
Posts: 379
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
What version of mySql are you using - it needs to be version 4 or greater (the details are in the docs). Otherwise that statement appears to be the correct syntax.
I would try hand coding the SQL into the command line and checking that it actually executes.
__________________
Strategy Conscious |
|
|
|
|
|
PM User | #5 |
|
New Coder ![]() Join Date: Aug 2004
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
the console gives me the following error:
#1064 - You have an error in your SQL syntax near 'aa_db_surface2city,*aa_db_surface2contact FROM aa_db_surface2city,*aa_db_surfa' at line 1 The documentations refers to the error as follows: Error: 1064 SQLSTATE: 42000 (ER_PARSE_ERROR) Message: %s near '%s' at line %d Now what does that tell me ? |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Rate This Thread | |
|
|