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 [...]
Archive for the ‘Mysql Tips’ Category
Concatinate fields in mysql query
Posted: November 13, 2007 in Mysql Stuff, Mysql TipsTags: Concatinate string, concat_ws, string function mysql
0
Format date values in mysql query
Posted: November 12, 2007 in Mysql Stuff, Mysql TipsTags: date format php, date_format, mysql date
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 [...]