Jump to content


Photo

MySQL question


  • Please log in to reply
1 reply to this topic

#1 Redux

Redux
  • New Members
  • Pip
  • Newbie
  • 1 posts
  • LocationPhilippines

Posted 06 March 2006 - 05:30 AM

Hi to all,
I know this is not the proper category to post my problem since it is mysql related.. I have a name field in my database (eg. John Smith L.) what i want to happen is to split this into three fields (fname,lname mname) mname stands for middle name.. Help me please.

Thanks in advance!

#2 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,021 posts

Posted 06 March 2006 - 08:17 AM

try

list($fname,$lname $mname) = explode (' ', $row['name']);

If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users