![]() |
|
|
|||||||
![]() |
|
|
Thread Tools | Rate Thread |
|
|
PM User | #1 |
|
Regular Coder ![]() Join Date: Aug 2002
Posts: 421
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
delete and and
Could u plz explain me why the delete with the the and doesn't work??
delete from sessions where session="f90272aa4c90197776c2d269c4e7f8d0" and isbn=" 0-0230942-1-4" this command delete from sessions where session="f90272aa4c90197776c2d269c4e7f8d0" works fine delete from sessions where isbn=" 0-0230942-1-4" and also this one too |
|
|
|
|
|
PM User | #2 |
|
Regular Coder ![]() Join Date: Jul 2003
Location: New Zealand
Posts: 433
Thanks: 1
Thanked 0 Times in 0 Posts
![]() |
from what i can see, there is no reason they shouldn't work together. but if you can't get it sorted, just do two queries. i also expect that you only want to delete one session? include limit attribute.
Code:
delete from sessions where session="f90272aa4c90197776c2d269c4e7f8d0" limit 1 delete from sessions where isbn=" 0-0230942-1-4" Code:
DELETE FROM sessions WHERE session = "f90272aa4c90197776c2d269c4e7f8d0" LIMIT 1 DELETE FROM sessions WHERE isbn = " 0-0230942-1-4" |
|
|
|
|
|
PM User | #3 | |
|
Master Coder ![]() ![]() Join Date: Jul 2002
Posts: 6,589
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
doing it withtwo querys is impossible. That would be the equivalent of
where session="f90272aa4c90197776c2d269c4e7f8d0" OR isbn=" 0-0230942-1-4" Quote:
If no rows or deleted, then this usually means that none of the records passed both conditions ... was the space in the isbn-value intentionally? try a SELECT COUNT(*) as checknum FROM sessions WHERE session="f90272aa4c90197776c2d269c4e7f8d0" and isbn=" 0-0230942-1-4" and check if checksum is higer then 0
__________________
Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Rate This Thread | |
|
|