Efficient Query/Database Structure?

2001-05-17 Thread Anatole
Perhaps this is a common problem: I would like to have a database field that contains multiple code numbers and later search for the presence of one of the codes. What I have come up with so far is using a delimter between the code numbers to end up with a field like: 12534 When searching I'm

RE: Efficient Query/Database Structure?

2001-05-17 Thread Chris Bolt
Create another table with an id column and a code column, and for each code insert a column with the id of the row in the original database and the code. Then do an SQL join to search. For example: mysql create table example (id int(11) NOT NULL auto_increment, blah varchar(100), PRIMARY