PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
$query = "SELECT DATE_FORMAT('%d/%m/%y', 'dateoflastcontact')
AS dateoflastcontact, DATE_FORMAT('%d/%m/%y', 'datecontactagain')
AS datecontactagain, * FROM people ORDER BY firstname";
still getting this error message:
Error in query: You have an error in your SQL syntax near '* FROM people ORDER BY firstname' at line 3
SELECT *, DATE_FORMAT('%d/%m/%y', `dateoflastcontact`)
AS `dateoflastcontact`, DATE_FORMAT('%d/%m/%y', `datecontactagain`)
AS `datecontactagain` FROM `people` ORDER BY `firstname`
$query = SELECT * DATE_FORMAT('%d/%m/%y', `dateoflastcontact`)
AS `dateoflastcontact`, DATE_FORMAT('%d/%m/%y', `datecontactagain`)
AS `datecontactagain` FROM `people` ORDER BY `firstname`
this is wierd but now the screen has just gone blank
any ideas whats wrong??
Last edited by mohson on Tue Jan 18, 2005 8:48 am, edited 1 time in total.
$query = SELECT * DATE_FORMAT('%d/%m/%y', `dateoflastcontact`)
AS `dateoflastcontact`, DATE_FORMAT('%d/%m/%y', `datecontactagain`)
AS `datecontactagain` FROM `people` ORDER BY `firstname`
this is wierd but now the screen has just gone blank
thanks that was just a typo though as I thought the (,) might be causing a problem didnt matter though because it doesnt work with or wothout it can you spot anything else that might be wrong
Also I used the error reporting but it doesnt do anything (see post above) have I placed it in the correct place in the example above??
the problem is, if `some column` matches another column name returned by the asterix, and you fetch using associative, you will get a collision, and the latter column will prevail.