Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how to retrieve from database..... this format (PRMRMDU402).
firstname= prabhu, lastname=kumar, city=madurai,
pincode=624402....

i want first name first two letters and last name last two
letters ... city first two letters ... pin code last three
letters....

Answer Posted / ajit

SELECT SUBSTRING(`firstname`,1,2) as 'firstname',SUBSTRING
(`lastname`,-2) as 'lastname',SUBSTRING(`city`,1,2) as
'city',SUBSTRING(`pincode`,-3) as 'pincode' FROM
`user_info` WHERE 1

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain include(), include_once, require() and require_once?

1071


What are php filters?

1008


Which array function checks if the particular key exists in the array?

952


What is cookie and why do we use it?

1043


What is interface? Why it is used?

1079


How would you declare a function that receives one parameter name hello?

1023


What’s the difference between htmlentities() and htmlspecialchars()?

1142


Which php global variable is used for uploading a file?

1068


What is whitespace in php?

1107


What is asort php?

1054


What is the interface in php?

1091


What are the different types of statements that are present in php?

1066


How to assigning a new character in a string using php?

1271


Tell me is it possible to submit a form with a dedicated button?

1006


Explain mixed and callback functions?

1207