what i have at the moment is a item table set out like this
--
-- Table structure for table items
CREATE TABLE IF NOT EXISTS items (
id int(250) NOT NULL AUTO_INCREMENT,
name varchar(250) NOT NULL DEFAULT 'None',
type int(10) NOT NULL DEFAULT '0',
attribute int(250) NOT NULL DEFAULT '0',
cost int(250) NOT NULL DEFAULT '0',
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;
type and atrribute reffer to the type of item and the atribute will be what the items effect has on an area of the game
and once i know how to do this array thingy the shops table is going to be set out like this
CREATE TABLE IF NOT EXISTS shops (
id int(250) NOT NULL AUTO_INCREMENT,
name varchar(250) NOT NULL DEFAULT 'None',
city int(10) NOT NULL DEFAULT '0',
items varchar(250) NOT NULL DEFAULT '0',
PRIMARY KEY (id)
)
the city int is for a connection to the citys table so i can assign diferant shops for each city and the items varchar is where i am going to put my string of ids for the items.
i have already made the items and the cities work fine, and my aim for the shops is to be able to make shops for diferant cities that will sell differant items, there will be no limit on stock and it will simply be used to make items in a transfer for money, just need to know how to get this array thingy to work like the mysql while thingy that i put in my first post in this thread.
btw thank you very much for answering so quickly.