Page 1 of 1
Warning Error
Posted: Sat Feb 28, 2009 11:47 pm
by Spookytheda
Hey! My knowledge of php is absolute minimal. I managed to get my site together but am receiving an error that reads...
Warning: date() expects parameter 2 to be long, string given in /home/sigmadiv/subdomain_html/sdhq/admin/admin_colist.php on line 50
The coding I do have says:
<td>Name: <?php echo $cos[5]; ?><br />Last report: <?php echo $cos[7]; ?><br />Application Date: <?php echo date("F j, Y, g:i a",$cos["appdate"]); ?></td>
Any help, advice, suggestions you can give me is greatly appreciated!
Re: Warning Error
Posted: Sun Mar 01, 2009 1:11 am
by php_east
<td>Name: <?php echo $cos[5]; ?><br />Last report: <?php echo $cos[7]; ?><br />Application Date: <?php echo date("F j, Y, g:i a",$cos["appdate"]); ?></td>
Any help, advice, suggestions you can give me is greatly appreciated!
don't know the nature of value $cos["appdate"] is, but try and see if
strtotime($cos["appdate"]) gives meaningful results.
like so...
<?php echo date("F j, Y, g:i a",strtotime($cos["appdate"])); ?>
Re: Warning Error
Posted: Sun Mar 01, 2009 2:27 am
by Spookytheda
Your a champion! It's fixed

Re: Warning Error
Posted: Sun Mar 01, 2009 2:31 am
by Spookytheda
Now this is going to sound really stupid but anyone able to explain this error for me?
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '5, 1)' at line 1
Re: Warning Error
Posted: Sun Mar 01, 2009 2:16 pm
by php_east
here is the same error translated into english...
" you were trying to send some instructions to mysql, but your instructions were unclear.
you have not spoken the mysql langauge correctly, and mysql was not able to understand what you meant at line (1) near the text '5,1'. therefore, mysql has no choice but to stop receiving the instructions and send u a message which says...
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '5, 1)' at line 1
hope this helps.
Re: Warning Error
Posted: Sun Mar 01, 2009 2:22 pm
by php_east
Spookytheda wrote:Your a champion! It's fixed

if one bug fix makes a champion, we would have an overpopulation of champions on earth here, right now.

but thanks anyway for the compliments.