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
Which is not a file-related function in php?
What are the characteristics of php?
How is the ternary conditional operator used in php?
What is isset function in php?
What is traits? How it is used in php?
Why php is better?
What is meant by ‘passing the variable by value and reference' in php?
Which software is used to run php programs?
Which function you can use in php to open a file for reading or writing or for both?
Is php fully object oriented?
What is the current stable version of php? What advance thing in php7?
Binary tree question - Node has numeric data (int) The function takes depth as argument and sum all the value of the node of the depth. For instance, (0) depth 0 / \ 10 20 depth 1 / \ / \ 40 50 60 70 depth 2 so if you pass get_sum(2), you would return 220 which is 40+50+60+70 (sum of depth2) write the function.
What is the difference between pop3 IMAP and MAPI?
How to replace a substring in a given string?
Is empty in php?