-7

I need to take only three characters from the string stored in MYSQL and output must be the first 3 character and the login date of customer

I am beginner kindly help me to code in PHP.

chris85
  • 23,846
  • 7
  • 34
  • 51
  • 1
    Have you tried something yet? – Tim Biegeleisen Jan 09 '17 at 03:26
  • http://dev.mysql.com/doc/refman/5.7/en/string-functions.html#function_substr, then also pull the date column. Not really a PHP question unless that's the part you are having issues with; if so add the relevant PHP. – chris85 Jan 09 '17 at 03:39

1 Answers1

-1
SELECT LEFT(string , 3) , logindate FROM tbl;

Hope this will help you.

Manoj Sharma
  • 1,467
  • 2
  • 13
  • 20