CodeLobster IDE

Free cross-platform PHP IDE (HTML, PHP, CSS, JavaScript, Python code editor) with support Drupal, Joomla, Twig, JQuery, BackboneJS, LaravelJS, Node.js, CodeIgniter, CakePHP, Laravel, Magento, MeteorJS, Phalcon, Symfony, VueJS, WordPress, Yii
It is currently Thu Mar 28, 2024 8:02 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: How to delete record which begin with a certain value within
PostPosted: Fri Sep 26, 2014 6:54 pm 
Offline

Joined: Fri Sep 26, 2014 6:44 pm
Posts: 1
I've got a table named "Alias" , now I want to delete all records which begin with "tq=" within the "code" field.
For example..
if there is a record with: tq=4 in the "code" field, the record has to be deleted.
if there is a record with: ga=3 in the "code" field, the record may not be deleted.

I don't know how to do this, I have googled a while without result. Hopefully one of you guy's can help me with getting the sql coding.


Last edited by congay2014 on Tue Mar 14, 2017 3:08 am, edited 3 times in total.

Top
 Profile  
 
 Post subject: Re: How to delete record which begin with a certain value wi
PostPosted: Mon Sep 29, 2014 6:27 am 
Offline
Site Admin

Joined: Wed Sep 12, 2007 2:18 pm
Posts: 3931
Hi.

Try something like that:

DELETE FROM 'Alias' WHERE 'code' LIKE 'tq=%'

Regards,
Codelobster Team.


Top
 Profile  
 
 Post subject: Re: How to delete record which begin with a certain value wi
PostPosted: Sun Dec 24, 2017 7:56 am 
Offline

Joined: Sun Dec 24, 2017 7:52 am
Posts: 1
I am also in this case, can you explain it to me.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 55 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2016 phpBB Group