Re: displaying image from blog

From: Date: Tue, 04 Oct 2005 17:14:41 +0000
Subject: Re: displaying image from blog
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-223613@lists.php.net to get a copy of this message
Sorry, meant BLOB, not blog. On 10/4/05, blackwater dev <blackwaterdev@gmail.com> wrote: > I am querying a MSSQL db where an jpg image is stored as a blog. > > I have this code: > > <html> > <head> > <meta http-equiv="Content-Type" content="image/jpg"> > </head> > <body> > <? > //Do the query > include_once("../includes.list.php"); > $ms_sql= new ms_db(); > $my_sql=new Database(); > $query="select photo from cars where id=22"; > $data=$ms_sql->query($query); > while($obj = $ms_sql->objects('',$data)){ > echo $obj->photo; > } > $data=$ms_sql->disconnect(); > ?> > </body> > </html> > > But when viewed I just get all the junk code: > > !1AQaq"2B'¡±Á #3RðbrÑ > > $4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š'""•–—˜™š¢£¤¥¦§¨(c)ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚâãäåæçèéêòóôõö÷øù > > What is wrong? > > Thanks! >

« previous php.general (#223613) next »