LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-28-2001, 03:07 PM   #1
gluon
Member
 
Registered: Jun 2001
Location: Switzerland
Distribution: SuSE 8.[012], Gentoo
Posts: 42

Rep: Reputation: 15
Question mysql and complex data types...


Hello everybody,

I'm searching a way of storing different data types into a mysql database, for example in image (.jpeg), using a blob type for the concerned colomn... but it doesn't work at all ! Is there a way of doing that, without only storing the path to the specified file ?

Thanks ! Gluon
 
Old 10-29-2001, 03:14 AM   #2
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
In what way doesn't it work, and how are you trying?

cheers

Jamie...
 
Old 10-29-2001, 12:50 PM   #3
gluon
Member
 
Registered: Jun 2001
Location: Switzerland
Distribution: SuSE 8.[012], Gentoo
Posts: 42

Original Poster
Rep: Reputation: 15
Hi,

Here is the output lines :
mysql> SELECT * FROM files;
Empty set (0.00 sec)

mysql> DESCRIBE files;
+-------+----------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+----------+------+-----+---------+-------+
| data | longblob | YES | | NULL | |
+-------+----------+------+-----+---------+-------+
1 row in set (0.00 sec)

mysql> LOAD DATA LOCAL INFILE "login.pcx" INTO TABLE files;
Query OK, 158 rows affected (0.02 sec)
Records: 158 Deleted: 0 Skipped: 0 Warnings: 60

Ideally, I'd like to have 1 single affected row, instead of 158... I guess that some characters of the file are interpreted as end_of_line's, aren't they ?

Thanks in advance !
Gluon
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Issues with multiple data types (C/C++) R00ts Programming 2 11-16-2005 08:37 PM
Data binding in mysql gayatri Linux - Software 0 05-18-2004 10:27 AM
MYSQL Adding Data Ronw Linux - Software 3 04-13-2004 02:08 PM
MySQL Data Directory Hamma Linux - Software 1 05-28-2003 02:30 PM
inserting data in mysql zuessh Linux - Software 4 05-19-2003 01:00 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration