I have a theatre database of performer names, where they played, characters, head shots, biographies, etc:
So I have columns ...fname, lname, source, picture, bio, additionalinfo... Then I have char1, prod1, date1
Most of the performers have multiple productions and characters that I wanted to show on the listing so I added an additional 15 columns to the database to account for:
char2...6, prod2...6, date2...6
Now, I used the search function and got examples of most of the code that I need--examples of the alternate table colors, alphabar and the query to select items by first letter which I modified to be applicable to a variable cat:
$result = mysql_query("SELECT * FROM $table WHERE $cat like '$name%'");
Problem 1: Is it possible to get the program to select from six different tables at once? I.e. if I want to display items from fields char1~char6 with the first letter 'c'...
I tried:
index.php?alpha=C&cat=(char1|char2|char3|char4|char5|char6)
But it returns neither mySQL errors nor results.
Problem2: Some times they played multiple characters in the same production. Rather than add more columns is it possible to search with in a record for a partial match?
I.e. for this record:
VALUES('NULL','Aruj','Silvia','','','','','Mary / Sue-Ellen, Billie-Joe-Bob','Broadway','1997 / 1998','Barbara','Argentina','1993','','','','','','','','','','','','');
If I wanted to return a list of everyone with Sue-Ellen in the name field? Even if it didn't start with that name?
Thanks in advance for answering. 😃
--