Showing posts with label column. Show all posts
Showing posts with label column. Show all posts

Sunday, April 29, 2018

Update/Select stored records/content with prefix suffix in Mysql

Basically, I need to add a prefix OR a suffix to the contents of a cell for all records.
Example  Column name "mobile_number " in table name tableName with 5000 records...

mobile_number
0123456789
0987654321
0125556789
0123456999

I need to add the prefix "88" as a country code to all records so that it looks like this after SQL query runs...
mobile_number
880123456789
880987654321
880125556789
880123456999

For SELECT the query use

select concat('Prefix', mobile_number , 'Suffix')
  from theTable;For Updateupdate tableName 
   set mobile_number  = concat('88', mobile_number );For prefix and Suffix both or only prefix/suffixupdate tableName 
   set mobile_number  = concat('Prefix', mobile_number , 'Suffix');

Wednesday, July 27, 2016

How many default tables joomla 3 has

Most of times joomla user download quick start package of joomla and install. Which contains many extensions. many joomla user don't know/notice actually how many joomla tables has by default.
Total default joomla 3 tables 68.

Thanks

Total Pageviews