CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 MySQL longblob field type

Print topic Send  topic

Author Message
asongo


Posts: 19
Posted: 05/22/2007, 5:22 PM

Anyone knows what is the data type in CCS corresponding to MySQL longblob binary field type ?
_________________
PHP 4.4x ,MySQL 4.0x
Kaohsiung,Taiwan
View profile  Send private message
mamboBROWN


Posts: 1713
Posted: 05/22/2007, 5:37 PM

asongo
Exactly what are you planning on storing in the datafield??
View profile  Send private message
asongo


Posts: 19
Posted: 05/22/2007, 8:25 PM

I want to read the image field from previous project coded by PHPRunner
_________________
PHP 4.4x ,MySQL 4.0x
Kaohsiung,Taiwan
View profile  Send private message
wkempees
Posted: 05/23/2007, 1:50 AM

MEMO


"asongo" <asongo@forum.codecharge> schreef in bericht
news:246538943e6dfa@news.codecharge.com...
> Anyone knows what is the data type in CCS corresponding to MySQL longblob
> binary field type ?
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

asongo


Posts: 19
Posted: 05/23/2007, 5:09 PM

Quote wkempees:
MEMO



"asongo" <asongo@forum.codecharge> schreef in bericht
news:246538943e6dfa@news.codecharge.com...
> Anyone knows what is the data type in CCS corresponding to MySQL longblob
> binary field type ?
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>


Thanks wkempees,
but I have try all the data type in CCS ,still can not read the image from table field type longblob

_________________
PHP 4.4x ,MySQL 4.0x
Kaohsiung,Taiwan
View profile  Send private message
wkempees


Posts: 1679
Posted: 05/23/2007, 5:56 PM

You cannot, directly, display image from blob.

I personally do it like this:
I have a showimg.php file
Content:

  
<?php  
  
  
$id = get_param('id');  
  
if($id) {  
  
    $conn = db_connect();  
  
    $sql = "select mimetype,img from pictures where pct_id=$id";  
    $result = @mysql_query($sql,$conn);  
  
    if(mysql_num_rows($result) == 1) {  
  
       $img      = @mysql_result($result,0,"img");  
       $mimetype = @mysql_result($result,0,"mimetype");  
       Header( "Content-type: $mimetype");  
       echo $img;  
    }  
};  
?>  

(You will have to change to your own connect)

The purpose of this showimg.php?id=1234
is to retreive the content of your longblob (img) from the table
and echo it back using the correct mime_type

Using the TopMenu Search facility and searching for "display picture blob"
I got you these topics, well explaining what to do.
http://forums.codecharge.com/posts.php?post_id=56625&s_...ay+picture+blob

http://forums.codecharge.com/search.php?s_keyword=blob+...[]=21&s_period=

Hope this helps.

Walter

_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message
wkempees


Posts: 1679
Posted: 05/23/2007, 6:01 PM

In fact the GOOD answer is in this long funny topic.

http://forums.codecharge.com/posts.php?post_id=49663

read the last two posts by machrow.
read the rest just to see how a simple question can lead to.......

Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.