Wrox Programmer Forums
|
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 9th, 2005, 02:16 AM
Authorized User
 
Join Date: Feb 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default please help me

hi all
how i can read image with php from sqlserver
 
Old February 10th, 2005, 04:36 AM
Authorized User
 
Join Date: Jul 2004
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to rajuru Send a message via Yahoo to rajuru
Default

plz. tell more about ur problem

Best Regard:
Md. Zakir Hossain (Raju)
www.rubd.net
www.xenex.rubd.net
www.forum.rubd.net
 
Old March 31st, 2005, 10:07 PM
Registered User
 
Join Date: Mar 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to handset
Default

i have a problem with image too. I have an image on my local. How can i save to sqlserver? And how can i reload the file to display on web? (using PHP+javascript).
thksss to your all concern.

292211058282
 
Old April 14th, 2005, 06:34 AM
Friend of Wrox
 
Join Date: Dec 2004
Posts: 154
Thanks: 0
Thanked 0 Times in 0 Posts
Default

From andreasfriedrich:

$fp = fopen("s:/title.gif", "rb");
$content = mysql_escape_string(fread($fp, filesize "s:/title.gif")));
$y = mysql_query("INSERT INto table SET content='$content'");

The field must be BLOB type.

more info:
http://www.webmasterworld.com/forum88/754.htm

Note: Opening a picture from a database will drain the server resources...










Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.