Skip to main content
gamedev.net
🔒 Locked

Database Programing help needed

Started by JustSomeGuy10 0 replies 650+ views
Original Post
JustSomeGuy10
JustSomeGuy10
I wish to add images to the seconde table how would i go about doing this??

CREATE TABLE testblob (
 image_id tinyint(3) NOT NULL AUTO_INCREMENT,
 image_type varchar(25) NOT NULL,
 image longblob NOT NULL,
 image_size varchar(25) NOT NULL,
 image_ctgy varchar(25) NOT NULL,
 image_name varchar(50) NOT NULL,
 KEY image_id (image_id)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE 'normalarmor' (
   'normalarmorID' int(11) NOT NULL auto_increment,
   'normalarmorNAME' varchar(225) NOT NULL default '',  'normalarmorREQUIERMENTS' int(11) NOT NULL default '0',
   'normalarmorDEFENCE' int(11) NOT NULL default '0',
PRIMARY KEY ('normalarmorID')  ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT;How should i go abbout adding immages to the second one
zyrolasting
zyrolasting
Either add a column containing tinytexts for URLS, or check the following articles a quick search brought up for storing image data in a table directly.



Please share any IDEs, etc. you may be using, as I currently can only hope the above links help you, as I do not know what language you use outside the queries.

Cheers!
-Zyro

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.