Hello ! Guys help in my first endeavors in writing your admin
1) There is a table with projects: (portfolio)
2) A table is also created with all employees (sotrudniki)
3) In the administration panel when adding a new job, the employees who participated in creating the project are attached. Data stored in a table (post_tags)
postid = ID of the project, tagid = ID of the employee I managed to write all the data to the database, all the data is correctly distributed on the tablets. But with the conclusion on the project page, the problem. In my case, the four entries are only the same. PHP code for output
<?php $result = mysql_query("SELECT * FROM portfolio WHERE id=$id"); $myrow = mysql_fetch_array($result); $resultworkers = mysql_query("SELECT * FROM posts_tags",$db); $myrowworkers = mysql_fetch_array($resultworkers); $resultsupport= mysql_query("SELECT * FROM sotrudniki",$db); $myrowsupport = mysql_fetch_array($resultsupport); $count = mysql_num_rows($resultworkers); do { if ($myrow['id'] == $myrowworkers ['postid']) { printf ("<div class='team_block'> <img src='images/%s' alt='Pixwhite'> <div class='desc'> <span>%s</span> <p>%s</p> </div> </div>",$myrowsupport["sotrundikimg"],$myrowsupport["dolgnost"],$myrowsupport["fio"]); } else { } } while ($myrowworkers = mysql_fetch_array($resultworkers)); ?> 