Hi, i have four tables:books, info, autor, publisher and columns under tables;
books........... info............ autor............. publisher
------------... -------------... ---------------... --------------
id............. id............... id.................id
bookname .......type .............name ..............publisher name
autor_id .......year .............second name .......quantity
publisher_id ...autor............. year..............country
I tried with this relations but it did not work (is this normalization ok)
relations: autor.id = books.autor_id AND publisher.id = books.publisher_id AND info.id = books.id
I need to create relations and to create several reports (lets say name of the autor and his books, name of the publisher and his books)
The question is what is the best way to do that, I tried but the queries didnt work, and id column from autor should have the same data with autor_id column from books table so should i enter the data only in one place or in bouth AND how to use queries many times for displaying data from tables
for one table is SELECT * FROM table
while ($row = mysqli_fetch_array($result)){
echo"row[]";
but what should I do to get result from lets say 2 tables and from several queries?
It must be in php and mysql
THANKS!