Actually this has nothing to do with rows. I'm just trying to
substitute a value when a query returns an empty value.
On Jan 3, 2006, at 5:24 AM, El Bekko wrote:
On Monday 02 January 2006 7:54 pm, Ralph wrote:
I'm building a URL based on data extracted from mySQL and I want the
text space.
On Monday 02 January 2006 7:54 pm, Ralph wrote:
I'm building a URL based on data extracted from mySQL and I want the
text space.gif used as my default value should the variable $picture
by NULL.
The results of the code below kick back a value for $picture when it
is set in the database, but ign
NULL != Not set.
isset() tests to see if the variable exists. If your variable has a null value
it is set, it DOES exist, it just has NULL for a value. You should test for a
null value if that's what you want:
if ($picture == null)
Or perhaps the empty() function might be what you're looking
On Monday 02 January 2006 8:54 pm, Ralph wrote:
> I'm building a URL based on data extracted from mySQL and I want the
> text space.gif used as my default value should the variable $picture
> by NULL.
>
> The results of the code below kick back a value for $picture when it
> is set in the database,
I'm building a URL based on data extracted from mySQL and I want the
text space.gif used as my default value should the variable $picture
by NULL.
The results of the code below kick back a value for $picture when it
is set in the database, but ignores the space.gif if the database
result