Re: getting there- just need to output the data
| From: | Jo�o C�ndido de Souza Neto | Date: | Mon, 28 Aug 2006 16:06:34 +0000 |
| Subject: | Re: getting there- just need to output the data | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-241159@lists.php.net to get a copy of this message | ||
echo "<img src=\"".$row["img"]."\">";
But you must change one of the row variable, there are two while one inside
the other using the same var name.
""Ross"" <ross@aztechost.com> escreveu na mensagem
news:0F.DB.48682.57313F44@pb1.pair.com...
>I have retireved the unique gallery and all the data from the row. I now
>need to output the data ($row['bin_data']) as a jpg.
>
> <?
> include("includes/config.php");
>
> $link = mysql_connect($host, $user, $password) or die ('somethng went
> wrong:' .mysql_error() );
> mysql_select_db($dbname, $link) or die ('somethng went wrong, DB error:'
> .mysql_error() );
>
> $query = "SELECT DISTINCT gallery FROM thumbnails";
> $result = @mysql_query( $query,$link );
>
> while ($row = @mysql_fetch_assoc($result) ) {
>
> $gallery_id=$row['gallery'];
>
> $query2 = "SELECT * FROM thumbnails WHERE gallery ='$gallery_id' LIMIT 1";
> $result2 = @mysql_query($query2);
>
> while ($row = @mysql_fetch_array($result2, MYSQL_ASSOC)){
> echo $id=$row['id'];
>
> //i want to output the jpeg here
>
>
> }
>
> }