Hi I finally manged to work out how to combine the two statements 
below into one woeking statement.


$query_Recordset1 =("select *, DATE_FORMAT(thedate,'%W - %d/%M/%Y') 
as
editeddate from CC_Courses");


$query_Recordset1 = sprintf("SELECT * FROM CC_Courses WHERE
Course_Category = '%s'", $colname_Recordset1);


It works fine like this:

$query_Recordset1 = sprintf("SELECT * ,DATE_FORMAT(thedate,'%%d/%%M/%
%Y') as editeddate FROM CC_Courses WHERE thedate >= CC_Courses.tdate 
AND Course_Category = '%s'", $colname_Recordset1);


All fine so far - However I am now trying to ORDER BY editeddate and 
I keep getting an unexpected t string error message. I have tried 
variations on :



$query_Recordset1 = sprintf("SELECT * ,DATE_FORMAT(thedate,'%%d/%%M/%
%Y') as editeddate FROM CC_Courses WHERE thedate >= CC_Courses.tdate 
AND Course_Category = '%s'", $colname_Recordset1 ORDER BY 
CC_Courses.thedate ASC );

but no luck. I am sure it must be something simple but I am not 
getting anywhereat all! could someone please advise me?
TIA
M










The php_mysql group is dedicated to learn more about the PHP/MySQL web database 
possibilities through group learning.  
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php_mysql/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to