FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » query with empty resultset (but the same one, used in phpmyadmin, gives results!!)
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: query with empty resultset (but the same one, used in phpmyadmin, gives results!!) [message #175358 is a reply to message #175350] Sun, 11 September 2011 11:45 Go to previous messageGo to previous message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma:
Senior Member
On Sat, 10 Sep 2011 04:34:15 -0700, SatBoy78 wrote:

> solved!
>
> the problem was $month=09;
>
> correct is $month=9;

http://www.php.net/manual/en/language.types.integer.php

$month = 09; // sets $month to the octal value 09, but 9 is an illegal
octal digit, so you actually get 0.

Interestingly, with E_ALL | E_STRICT this particular invalid assignment
doesn't seem to generate any sort of warning, but using an invalid hex
character after 0x does.

<?php
$month = 09;
echo "{$month}\n";
$month = 0Xg; // this is line 4!
echo "{$month}\n";
?>

$ php programming/php/gergberg.php
PHP Parse error: syntax error, unexpected T_STRING in /home/denis/
programming/php/gergberg.php on line 4
$

Rgds

Denis McMahon
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: HOW TO: Spice up Your Site With Simple PHP
Next Topic: Stats comp.lang.php (last 7 days)
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 12:00:21 GMT 2024

Total time taken to generate the page: 0.04994 seconds