PHP/MySQL - Multiple Selects For Query -
i'm writing simple musicians database has search function e-mail details of musicians people when search specific instrument in database. have people play more 1 instrument therefore have 5 tables, instrument, instrument2, instrument3, instrument4, instrument5.
i have mysql query on e-mail function cannot search more 1 table.
here code:
$query = "select * instruments (instrument, instrument2, instrument3, instrument4, instrument5) = '$search'"; am being stupid syntax or going wrong way this.
many thanks.
have tried:
select * instruments '$search' in (instrument, instrument2, instrument3, instrument4, instrument5) ? assume want.
but real solution create separate table instruments , not keep multiple columns same information.
you should have table musicians , 1 instruments hold general instruments , info. , 3rd 1 (used resolve many many relationship between instruments , musicians) holds musician id , instrument id.
here's few useful links:
Comments
Post a Comment