Re: [PHP] Table shows even when if () is false

2007-08-26 Thread Richard Lynch
The definition of 'empty' changed several times in the life of PHP. I think an empty array was always empty though... Still, if it's giving you grief, just use http://php.net/count On Wed, August 22, 2007 4:06 pm, Dan Shirah wrote: > From my understanding, if $result_deferred_comments is empty,

Re: [PHP] Table shows even when if () is false

2007-08-22 Thread Dan Shirah
Ah, I see. Changed and working. Thanks Jay! On 8/22/07, Jay Blanchard <[EMAIL PROTECTED]> wrote: > > [snip] > [snip] > $deferred_comments= "SELECT * FROM comments WHERE credit_card_id = > '$credit_card_id' AND request_type = 'D'"; > $result_deferred_comments = mssql_query($deferred_comments) or

Re: [PHP] Table shows even when if () is false

2007-08-22 Thread Daniel Brown
On 8/22/07, Dan Shirah <[EMAIL PROTECTED]> wrote: > From my understanding, if $result_deferred_comments is empty, than none of > the code below the if should be executed, correct? > > The actualy rows/columns that would contain the data do not appear, but I am > still seeing the "DEFERRED PAYMENT R

RE: [PHP] Table shows even when if () is false

2007-08-22 Thread Jay Blanchard
[snip] [snip] $deferred_comments= "SELECT * FROM comments WHERE credit_card_id = '$credit_card_id' AND request_type = 'D'"; $result_deferred_comments = mssql_query($deferred_comments) or die(mssql_error()); if(!empty($result_deferred_comments)) { [/snip] $result_deferred_comments is not empty, a

RE: [PHP] Table shows even when if () is false

2007-08-22 Thread Jay Blanchard
[snip] $deferred_comments= "SELECT * FROM comments WHERE credit_card_id = '$credit_card_id' AND request_type = 'D'"; $result_deferred_comments = mssql_query($deferred_comments) or die(mssql_error()); if(!empty($result_deferred_comments)) { [/snip] $result_deferred_comments is not empty, a query r

[PHP] Table shows even when if () is false

2007-08-22 Thread Dan Shirah
>From my understanding, if $result_deferred_comments is empty, than none of the code below the if should be executed, correct? The actualy rows/columns that would contain the data do not appear, but I am still seeing the "DEFERRED PAYMENT REQUEST COMMENTS" table. Is the only way to block out EVERY