Retrieve data insert database!!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ipohismytown
Forum Newbie
Posts: 4
Joined: Tue Feb 09, 2010 10:02 am

Retrieve data insert database!!

Post by ipohismytown »

i want to retrieve the information from database to display a product pictures.

Database Information

Code: Select all

 
Table name : product
Column name : prod_img_url 
Information inside the column : pic1.jpg,pic2.jpg,pic3.jpg
 
Image display ( i only want display 1 result for "pic1.jpg")

Code: Select all

<img src="/localhost/images/<?php echo $row['prod_img_url']"?>
mikosiko
Forum Regular
Posts: 757
Joined: Wed Jan 13, 2010 7:22 pm

Re: Retrieve data insert database!!

Post by mikosiko »

and where is the code that you have wrote so far?... which are your doubts or questions?... or are you asking for somebody to write the code for you?.

Show what are you done and specific questions... In the long term that will be good for you

Miko
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

Re: Retrieve data insert database!!

Post by AbraCadaver »

mikosiko wrote:and where is the code that you have wrote so far?... which are your doubts or questions?... or are you asking for somebody to write the code for you?.

Show what are you done and specific questions... In the long term that will be good for you

Miko
They already have it in $row, so I'll assume they've done something:

Code: Select all

$pic1 = array_shift(explode(',', $row['prod_img_url']));
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
mikosiko
Forum Regular
Posts: 757
Joined: Wed Jan 13, 2010 7:22 pm

Re: Retrieve data insert database!!

Post by mikosiko »

one line doesn't help to much to try to help them. :) ... yes.. you can assume... but you probablly already know the big rule about "assume" right? :drunk:

all good :wink:
Post Reply