On Tue, Sep 23, 2008 at 11:29 PM, zarilahr <zarilahr@yahoo.com> wrote:
> Dear Sirs
> i have stored some images in mysql as varchar. when i query those
> images from php to display they displayed vertically. i want to
> display them horizantally. also i put a if condition to break the
> images with the quantity of 2. but still unable to get the desired
> display. below is the code me using. plz some one help me.
>
> <table width="26%" border="1" cellspacing="0" cellpadding="0">
> <?php
> $i=0;
> $q = mysql_query ("select * from stuff where cat_id = '1'
> and prod_featured = 'yes'");
> while ($r = mysql_fetch_array ($q))
> {
> if ($i==3)
> {
> $i=0;
> }
> $i+=1;
> ?>
> <tr>
> <td><img src="images/<? echo $r["image_path"]?>" /></td>
>
> </tr>
> <tr>
> <td><?php echo $r["image_name"]?></td>
> <?php
> }
> ?>
> </tr>
>
> </table>
>
> Regards
> Azhar
>
>
>
[Non-text portions of this message have been removed]
------------------------------------
The php_mysql group is dedicated to learn more about the PHP/MySQL web database possibilities through group learning. Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php_mysql/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/php_mysql/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:php_mysql-digest@yahoogroups.com
mailto:php_mysql-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
php_mysql-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
No comments:
Post a Comment