marzy Posted July 10, 2009 Share Posted July 10, 2009 Hi All, I am very new to using php and am working on a site for a band that want to be able to update there own information. I have created most of the backend using dreamweaver to generate some of the php code I require and I have also created the dateabase and tables. Everything is working OK except when I want to format the date and time on a details page. I have one page that displays only certain information and you can click on an entry to go to a details page displaying all the information. On the master page the select statement to produce the information works fine but on the details page once run I get this message Warning: sprintf() [function.sprintf]: Too few arguments in C:\wamp\www\Lycan\gigsdetail.php on line 40 Query was empty The php and sql select statement are below, If I just run this as a select * it works fine but trying to format the date and time gives the above error message mysql_select_db($database_LycanOnlinedb, $LycanOnlinedb); $query_DetailRS1 = sprintf("SELECT gigsid, location, date_FORMAT(date, '%e %M, %Y') as date, TIME_FORMAT(time, '%H:%i') as time, price, details FROM gigs WHERE gigsid = %s", GetSQLValueString($colname_DetailRS1, "int")); $DetailRS1 = mysql_query($query_DetailRS1, $LycanOnlinedb) or die(mysql_error()); $row_DetailRS1 = mysql_fetch_assoc($DetailRS1); $totalRows_DetailRS1 = mysql_num_rows($DetailRS1); I have searched all over but cannot find the solution. Any help much appreciated Thanks Lee Link to comment https://forums.phpfreaks.com/topic/165541-master-detail-page-sql-help/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.