List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:June 3 2003 6:44pm
Subject:Re: Mysql / PHP image link problem.
View as plain text  
At 19:20 +0100 6/3/03, Daniel Crompton wrote:
>I have a mysql table column called 'imagecolumn'  The rows contain links i.e.
>
>image.gif
>image.gif
>null
>image.gif
>image.gif
>
>To display in my web page im using:
>
><img src="<?php echo $row_Recordset1['imagecolumn']; ?>">
>
>This displays the above images in my html page
>
>The problem i have is where the field in my table is left blank 
>(null), a web browser shows this as a broken image link icon.  i.e. 
>it doesn't ignore it.
>
>Does anyone know how I can get my page to ignore it if there is no link.

Add WHERE imagecolumn IS NOT NULL to your SELECT statement.
Then you won't select the row at all.

Or did you mean something else?

-- 
Paul DuBois
http://www.kitebird.com/
sql, query
Thread
Mysql / PHP image link problem.Daniel Crompton3 Jun
  • Re: Mysql / PHP image link problem.Paul DuBois3 Jun
  • Re: Mysql / PHP image link problem.Roman Neuhauser3 Jun
  • RE: Mysql / PHP image link problem.Jonathan Villa3 Jun
  • Re: Mysql / PHP image link problem.Becoming Digital3 Jun
    • RE: Mysql / PHP image link problem.Peter Lovatt3 Jun