Sr. Web Developer
mediabistro.com
US-NY-New York

Justtechjobs.com Post A Job | Post A Resume

PHP, MySQL and images
OK, now that we all know the basics, its time to connect to the server. If you have any problems email support, they like answering these questions.
shell> mysql -h localhost -u joesauto -p
Enter password: ********

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 459 to server version: 3.22.20a-log

Type 'help' for help.

mysql>
After successfully connecting to the server we need to access the database (joesauto) that I got support to create for me. If you don't have a database yet now is the time to create one. To see what databases are on this server type show databases; if your database is there select it by typing use joesauto if you can't access the database contact support. This tutorial could take days if your support is slow.
mysql> use joesauto
Database changed
mysql>
OK, after alot of reading I figured out how to create a table for all the important data (year, make, model, price and picture), the picture part took alot of time to figure out, I found out that it was best to just store the picture filename in the database and store the actual picture in a specified directory on my server. Below is what I used to create the table. (I am sure there are other ways of creating this table but, this is what worked for me.)
mysql> CREATE TABLE joesauto(
   -> year INT(4),
   -> make CHAR(20),
   -> model CHAR(20),
   -> price CHAR(15),
   -> picture_name CHAR(25)
   -> );
[ Next Page ]

[Page 1]  [Page 2]  


Comments:
databasemugasho kenneth07/10/08 11:21
personal question :)thanasis07/16/07 20:12
Image, MySql and PHPRajesh Kumar singh07/14/07 07:02
RE: upload audio/vedio file into mysqlshyamasree06/04/07 02:35
RE: PHP+mySQL+mail with attachmentDeepshikha05/01/07 08:36
INSERT thumbs problems Lida12/10/05 08:58
Humm Dunno if this php or HTLM but...EsCanavi07/18/05 14:06
upload audio/vedio file into mysqlumesh06/21/05 02:45
RE: How to get to the Foto data?dreamz04/07/05 23:37
Insert and display images with MySQL?????padmaja03/15/05 12:42
you are a geniouspaolo02/19/05 19:15
To login a user without grant on mysqlmeberat02/15/05 05:45
To login a user without grant on mysqlmeberat02/15/05 05:40
How to get to the Foto data?Andre02/10/05 09:58
how to store an image into msaccess using sqlmohammed shaheen01/19/05 00:44
RE: PHP examples. Coud U help me?jose a calleja11/28/04 16:26
RE: newbie help!Luke08/02/04 03:38
RE: IMAGES PHP & MYSQL BETTER WAYEDGAR CORONEL05/06/04 14:16
RE: IMAGES PHP & MYSQL BETTER WAYEDGAR CORONEL05/06/04 14:14
RE: how do I convert an Access DB into mySQLciaran05/30/03 09:14
RE: Can you convert an SQL database to MySQLMogorosi03/06/03 04:58
The best way to upload and use images with MyLeonardo03/02/03 21:37
mySQL images - not in my db!madisonPixl02/04/03 07:25
An easier wayRichard01/20/03 15:02
RE: DB Gets slower with more images?IBM01/08/03 00:19
RE: E-Mail without informing / notifying the Craig McCormick12/26/02 09:36
RE: PHP examples. Coud U help me?gaby12/16/02 11:09
RE: which is better ...darq11/27/02 12:09
RE: DB Gets slower with more images?Devin11/26/02 22:07
Another simple approachgreg11/15/02 02:22
RE: DB Gets slower with more images?Scooby Doo10/26/02 18:59
store pictures into postgres databaseDannyboy10/23/02 15:23
view binary filePRASU10/10/02 07:09
help!how to convert datus to .jpgkinge10/01/02 15:03
WAMP Intranet and Uploading imagesneedle09/27/02 09:24
DB Gets slower with more images?Bruce Garlock09/25/02 13:45
E-Mail without informing / notifying the Vikas Athavale09/04/02 22:42
newbie help!kramer09/04/02 14:27
RE: How can I delet only the rows of a table?Rodrigo08/27/02 22:12
How can I delet only the rows of a table?Iason08/19/02 07:15
images and full pathRodrigo08/11/02 13:33
RE: how do I convert an Access DB into mySQLbgirl08/09/02 23:04
Creating off-site couter image...Jeff Dierking08/05/02 12:49
RE: how do I convert an Access DB into mySQLgeordie07/31/02 15:26
Can you convert an SQL database to MySQLLeslie07/17/02 07:12
Animated GIF not animatedThe Man07/09/02 17:17
Help me!Pham Dinh Tuan07/06/02 03:32
zip files and phpMark E. McEwen07/02/02 21:45
RE: where mysql save Database fileliyla07/01/02 00:10
RE: MYSQL AdminIvan06/28/02 07:14
How to load a file(SQL) into mySQL from mypcKim Gan06/28/02 03:00
Help: How do I display Images Imran06/26/02 07:23
images/ php/ mysqlMario Loefler06/15/02 19:02
RE: PostgreSql X MySQLMichael Smith06/08/02 00:43
RE: Getting the Referrer url (Try it)Dharmender06/01/02 09:10
How can show a image from MySQL BlobDharmender06/01/02 09:01
Update Databases via PHP script??sgary05/21/02 08:39
anybody,help me please!shakespeare04/25/02 05:30
RE: PHP examples. Coud U help me?Mike Benson04/24/02 12:35
Getting the Referrer urlJason S04/12/02 13:17
RE: help me...!!! I'm begginer Cesar04/10/02 14:29
RE: Displaying Images! Please Help!Cesar04/10/02 14:27
RE: php commands containd in mysqltux0r03/22/02 09:14
RE: Manipulating the BLOB dataBruce Garlock03/20/02 09:37
php commands containd in mysqlJeff03/18/02 20:27
RE: Manipulating the BLOB dataTux0r03/13/02 17:55
Manipulating the BLOB dataBruce Garlock03/12/02 17:21
RE: upload data to mysql databaseJeff03/08/02 10:27
RE: How to make it work on Windows?Sean Qin03/06/02 20:50
Better way?Thomas03/06/02 12:44
RE: How to make it work on Windows?Axel03/06/02 11:47
RE: PHP examples. Coud U help me?Antony Ellis02/28/02 08:45
help me...!!! I'm begginer zainal02/28/02 02:49
PHP examples. Coud U help me?hungbatrieu02/25/02 20:16
I'm looking for free host wich run php/mysql Dan Popa02/25/02 05:19
RE: Wow, absolutely exciting! I'm stunned...Miss S.02/20/02 18:07
Security & DB Michael Scott02/09/02 09:26
Displaying Images! Please Help!Sharapov02/01/02 19:19
RE: Recognizin' image typesGerardo Santana Gómez Garrido01/28/02 07:39
Recognizin' image typesGonzalo Aguirre01/21/02 11:45
How to insert images into mysql DBRomel01/19/02 00:05
image stored as binarykarim01/19/02 00:03
PostgreSql X MySQLLeonardo01/15/02 11:50
any one can help me to get gd library filessunil01/15/02 06:39
survey using php + mysqlGreg01/14/02 04:05
How to make it work on Windows?ray01/11/02 10:33
RE: PHP+mySQL+mail with attachmentBram01/07/02 06:17
Use of Wildcards in PHPRaji01/07/02 05:07
RE: Hi, i'm a beginner, plz help me !!Steven Chalker01/04/02 20:28
upload data to mysql databasehenry12/30/01 02:31
RE: How to convert an Access DB into mySQLKyle12/24/01 11:29
Hi, i'm a beginner, plz help me !!kooshal Nundlall12/12/01 03:35
RE: Working with JPEG files as BLOBSGirish11/28/01 02:03
RE: HELP -substituting images using mysqlAlon11/26/01 02:17
RE: Working with JPEG files as BLOBSNephi Cheng11/19/01 18:53
RE: Generating images dinamicalyChucks11/19/01 06:01
RE: How to convert an Access DB into mySQLWaygood11/12/01 06:44
PHP+mySQL+mail with attachmentMax11/09/01 09:58
HELP -substituting images using mysqljoel11/07/01 01:53
Why I got an syntex error for a nested query Boom Lee11/03/01 00:35
DecimalAndrea11/02/01 12:49
What to configure in apache or mysqldeqwe10/21/01 12:40
I'm a newbee Please,help me!Hawk10/10/01 18:50
Help me! i'm begginerJoy10/06/01 03:50
Please,help me!Ivelina10/02/01 03:06
RE: Working with JPEG files as BLOBSJakob Valen09/18/01 05:33
RE: which is better ...martin09/17/01 05:57
RE: How to store jpg in sqlserver2000 databas ?Cameron Cox09/01/01 17:11
RE: why can not get data?Stefan Reiter08/31/01 04:40
RE: TIFF and the web.wolfi08/31/01 01:04
Help, How Can I search records from MySQLHassan Khan08/19/01 08:24
RE: Uploading Images under IEPaul Dorneanu08/10/01 09:27
Fatal error:Call to unsupported mysql_connectLuis Brito08/10/01 08:47
RE: subquery on mysql ver 3.22Paul Dorneanu08/10/01 05:20
PHP MYSQL and IMAGESEdgar Aranza07/29/01 03:36
How to store jpg in sqlserver2000 databas ?shital07/17/01 10:24
thumbnails,mysql and pictures on HDD?robert 07/12/01 00:13
give me solution pls!koshy07/09/01 00:12
RE: MYSQL Admin (have you seen urSQL)Stan Jellen07/06/01 10:29
PHP / MySql / Image applicationWally Beddoe07/04/01 08:38
RE: Not updating MySQL dbase.tim.berline07/03/01 13:18
php/mysql and image displayPete Welsh07/02/01 07:58
why can not get data?Bao06/25/01 19:48
Code for uploading images from HDD??Mike L06/22/01 14:07
RE: Not updating MySQL dbase.MaXimus06/21/01 03:19
MYSQL test scriptBob06/20/01 19:59
RE: Generating images dinamicalyOliver06/20/01 02:52
RE: Why store images on the disk?Torsten Kammeyer06/19/01 00:50
MYSQL AdminGary06/18/01 02:28
RE: Working with JPEG files as BLOBSJonathan Harlap06/09/01 20:05
PHP apps using MySQLAlejandro Quesada L06/06/01 14:48
Generating images dinamicalyFrancisco Vazquez06/04/01 14:18
.php imageTommy05/25/01 10:33
Wow, absolutely exciting! I'm stunned...TomTom05/25/01 03:11
RE: Why not copying at all?Mita05/23/01 14:32
How do I get the picture_type ?Zeb05/23/01 01:30
Why don't you try this?Niclas05/21/01 12:24
TIFF and the web.batman05/17/01 02:57
Working with JPEG files as BLOBSUltor05/13/01 05:07
converting text file into a html tableMike05/09/01 09:48
Why not copying at all?Frits Jongbloets05/03/01 07:07
Bad, bad, bad database designJohn Smith04/25/01 12:30
Any idea generating vector graphics by phpsachin04/24/01 00:14
RE: Overwriting imagesdan jarrett04/22/01 23:31
RE: I am impressed with itmani04/17/01 03:42
RE: how do I convert an Access DB into mySQLBrad Farrar04/08/01 20:48
PHP - backgroundsSherryBerry04/04/01 09:21
RE: Not updating MySQL dbase.Johnny Roberts03/25/01 14:14
RE: subquery on mysql ver 3.22Akshaya03/23/01 06:41
RE: Retrieving tmp images!Jan-willem03/19/01 09:08
Retrieving tmp images!Ryan Boehm03/14/01 19:43
RE: how do I convert an Access DB into mySQLJohn Scrivener03/14/01 08:41
RE: Why store images on the disk?John Scrivener03/14/01 08:34
RE: Not updating MySQL dbase.John Scrivener03/14/01 08:05
Not updating MySQL dbase.Basher03/13/01 16:37
Nice to meet you all php coders :)Kyuni03/12/01 20:12
RE: Why store images on the disk?Dmitri03/08/01 13:29
RE: how do I convert an Access DB into mySQLWilliam Yang03/07/01 17:43
RE: Why store images on the disk?Mark Munro02/27/01 20:03
Use IDS!!grazzy02/23/01 07:11
RE: Why store images on the disk?Pauly02/22/01 11:27
Uploading Images under IEJoe Heth02/14/01 22:58
Hyperlinks & ImagesMike02/12/01 01:44
wanted to overwrite imagesneechee02/11/01 02:24
RE: INSERT problems with this examplechris02/07/01 12:26
RE: how do I convert an Access DB into mySQLTom Z. Meinlschmidt01/28/01 07:42
how do I convert an Access DB into mySQLDaniel01/25/01 23:20
how do I convert an Access DB into mySQLDaniel01/25/01 23:17
RE: Why store images on the disk?Markus01/23/01 05:33
Why store images on the disk?Matt H.01/22/01 15:38
Thanks PeteSean01/18/01 15:51
RE: images directory chmod 777?pezo01/11/01 04:01
RE: oops!Galaxal01/08/01 09:57
oops!another pete12/22/00 09:02
has anyone actually tried this?another pete12/21/00 23:55
INSERT problems with this examplePete12/20/00 12:21
subquery on mysql ver 3.22Manish Agrawal12/16/00 06:46
Thank you Alan, one question....Dan Higgins12/13/00 18:31
simple search, foundlist, detail pagesJeff Fackler12/13/00 17:09
Any sample sitesAhamed Kaize12/03/00 10:16
RE: images directory chmod 777?Robert Campbell11/14/00 07:41
PHP images articleBill Zappasodi11/13/00 11:29
does MySQL support SQL 2,3Rony Saliba10/09/00 10:57
RE: Overwriting imagesLuke Whitford10/07/00 13:43
RE: Overwriting imagesAlan Todd08/11/00 11:55
Overwriting imagesJamie Ross07/26/00 11:32
Overwriting imagesJamie Ross07/26/00 11:17
images directory chmod 777?jonathan wehner07/21/00 14:06
RE: which is better ...Hugh Saunders07/12/00 07:00
which is better ...Colin McDonald07/08/00 14:07
 

If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly.

Add A Comment:

Name:

Email:

Subject:

Message:

To reduce spam posts, messages are now manually approved

You are not [logged in]. That means your account will not get credit for this post.