Selectall

We Share What We Get

  • Archives

Archive for the ‘Mysql Tips’ Category

Mysql Tips n Tricks

Concatinate fields in mysql query

Posted by selectall on November 13, 2007

Normally we store data cobine values in different fields in database like First Name, Middle Name, Last Name. But while retriving data usually we wan’t to display data as a single string like display First Name, Middle Name, Last Name as a single string “User Name”.

To achive this output we concatinate all these sub values, some thing like this in PHP Read the rest of this entry »

Posted in Mysql Stuff, Mysql Tips | Tagged: , , | Leave a Comment »

Format date values in mysql query

Posted by selectall on November 12, 2007

By default Mysql store and returen ‘date’ data type values in “YYYY/MM/DD” format. So if we want to display date in different format then we have to format date values as per our requirement in scripting language.

Like in PHP if i want to display Date of Birth of student in “DD/MM/YYYY” format then i have to do something like this – Read the rest of this entry »

Posted in Mysql Stuff, Mysql Tips | Tagged: , , | Leave a Comment »