;
}
$ts = time();
$errno = $this->query_err_no;
$errmsg = addslashes($this->query_err_msg);
$state = $this->sqlstate;
$sql = "INSERT INTO pi_global.tblerrorlog
VALUES('','$ts','$query','$errno','
Tim Legg wrote:
> Hello,
>
> I just spent way, way to much time trying to debug code due to a misnamed
> element. Here is a simplified example of the problem I dealt with.
>
>
> $test = "SELECT * FROM `Materials` WHERE `Part_Number` = '125664'";
> $result = mysql_query($test,$handl
Bob McConnell wrote:
> From: Tommy Pham
>>> From: Tim Legg
>>>
>>> I just spent way, way to much time trying to debug code due to a
> misnamed
>>> element. Here is a simplified example of the problem I dealt with.
>>>
>>>
>>> $test = "SELECT * FROM `Materials` WHERE `Part_Number` =
> '125664'
>> I think the problem is that he didn't check that the key he used
>> actually existed before using the value it pointed to. So he got an
>> empty string for $row['Number']; because the key should have been
>> 'Part_Number'. I don't know that even E_STRICT would catch that one.
>>
>> Bob McConnell
- Original Message
> From: Bob McConnell
> To: Tommy Pham ; php-general@lists.php.net
> Sent: Wednesday, September 23, 2009 11:37:00 AM
> Subject: RE: [PHP] Stricter Error Checking?
>
> From: Tommy Pham
> >> From: Tim Legg
> >>
> >> I jus
From: Tommy Pham
>> From: Tim Legg
>>
>> I just spent way, way to much time trying to debug code due to a
misnamed
>> element. Here is a simplified example of the problem I dealt with.
>>
>>
>> $test = "SELECT * FROM `Materials` WHERE `Part_Number` =
'125664'";
>> $result = mysql_query
009 at 3:28 PM, Tommy Pham wrote:
>
>
> - Original Message
>> From: Tim Legg
>> To: php-general@lists.php.net
>> Sent: Wednesday, September 23, 2009 11:11:46 AM
>> Subject: [PHP] Stricter Error Checking?
>>
>> Hello,
>>
>> I just spent way, way to muc
- Original Message
> From: Tim Legg
> To: php-general@lists.php.net
> Sent: Wednesday, September 23, 2009 11:11:46 AM
> Subject: [PHP] Stricter Error Checking?
>
> Hello,
>
> I just spent way, way to much time trying to debug code due to a misnamed
> ele
Hi,
There is, see here (or it can also be set through php.ini):
http://www.php.net/manual/en/function.error-reporting.php
You are looking for E_STRICT.
Regards,
Jonathan
On Wed, Sep 23, 2009 at 3:11 PM, Tim Legg wrote:
> Hello,
>
> I just spent way, way to much time trying to debug code due
Hello,
I just spent way, way to much time trying to debug code due to a misnamed
element. Here is a simplified example of the problem I dealt with.
$test = "SELECT * FROM `Materials` WHERE `Part_Number` = '125664'";
$result = mysql_query($test,$handle);
if(!$result)
10 matches
Mail list logo