Inserting Images

  Mary_S 16:04 06 Dec 2005

Hi all,

Im wrkin on an ecommerce project creating a webisite using PHP and MySql. We wish to show a picture of all the products we sell and not sure how to do it.


  Forum Editor 22:52 06 Dec 2005

if we are to offer proper advice.

1. How many products are involved?

2. Are you using shopping-cart software?

E-commerce sites, by their very nature, can be complex things, and we'll need to get a better idea of what you are trying to achieve.

  Taran 23:21 06 Dec 2005

From your other thread you appear to want to display whatever is in your database.

Normally I'd shrink away from this since it can get rapidly out of hand, however, you only have a few product tables and I'm guesing each one is only likely to have a small number of available entries at any given time.

A simlpe SELECT all from tablename type of statement written in PHP will pull all entries from each table you list in the script.

I'd recommend at the very least limiting your output to perhaps 10 rows per page and include forward >> back << type navigation links at the bottom of each page.

You may also want to enhance the output by including header sorters, where a person can click a column title and sort by ticket type, or perhaps price and so on.

It would also be worth either hiding your
database details in the output, like ID's and other stuff, or using a more complex SELECT query where you pull the information from the tables based on column/field names as well as table names.

You wouldn't want to use and display a SELECT*FROM tablename query since your uotput would include vital (and useless) information like autonumber ID fields and so on.

SELECT f_name, l_name FROM staff_data;

The above would select all first names and last names from the table called staff_data.

I'm sure you get the general idea.


This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Xiaomi Mi Mix 2 review

What went wrong at the Designs of the Year 2017

iPhone X news: Release date, price, new features & specs

Comment utiliser Live Photos ?