Re: SQL statement
| From: | sfdgfg | Date: | Sun, 28 Sep 2003 15:48:22 +0000 |
| Subject: | Re: SQL statement | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-164170@lists.php.net to get a copy of this message | ||
Curt Zirzow wrote:
* Thus wrote Dan J. Rychlik (drychlik@tcsconsult.com):Well, we have a word for myself that over looks things and takes things literal. Its called "pencil smoke" It means dump, dunce, and lost. Jennifer was right, their was an error in my SQL query.technically it was an error in the code not the query.SELECT username, password, DATE_FORMAT(timestamp, '%d%m%y') as timestamp FROM custlogon; not as formatted_ts..... It worked fine even on zeus it tested fine.Glad to hear it worked. For future reference, however, it can be a lot easier to help you if you could provided some essential information about your problem, some things to keep in mind: - What is the error message. - Show some code that surrounds the line number in the error. - If a variable is causing the problem, explain how that variablegets assigned.So, If you would have posted a message something like: --- I get this error in my php script: Notice: Undefined index: timestamp in C:\Program Files\Apache Group\Apache2\htdocs\Ameriforms\admintool\includes\getlogonhist.php on line 44 My line 44 looks like this:<?php echo $row['timestamp'];?></font></td>The variable $row is filled in from a mysql_fetch_assoc() call And the query I'm executing is like this: SELECT username, password, DATE_FORMAT(timestamp, '%d%m%y') FROM custlogon --- So instead of 21 emails sent back and forth with trial and errors. The problem would have been easily solved. HTH, Curt