If I delete one record the SQL is
DELETE FROM `products_description` WHERE `products_description`.`products_id` = 1213 AND `products_description`.`language_id` = 1 LIMIT 1
If I want to delete from products_id =1000 to 1213
irrespect of other field how do I say it?
How do I say this:
Moderator: General Moderators
Re: How do I say this:
Code: Select all
DELETE FROM products_description
WHERE product_id >= 1000 AND product_id <= 1213Code: Select all
DELETE FROM products_description
WHERE product_id BETWEEN 1000 AND 1213Re: How do I say this:
do i need a quotation mark for 'products_description' etc?
- social_experiment
- DevNet Master
- Posts: 2793
- Joined: Sun Feb 15, 2009 11:08 am
- Location: .za
Re: How do I say this:
For the values you can use single quotes (') and for table fields, table names you can encase them in backticks (`)wvoyance wrote:do i need a quotation mark for 'products_description' etc?
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Re: How do I say this:
do i have to use quote? It seems no quote also work fine.
Re: How do I say this:
Given that the values are numerical, you don't need quotes. Putting backticks around table and field names is good practice, though.