hi, i am developing a video script like youtube. I have around 5 to 7 mysql queries in a php file called index.php.. is this normal? is it normal to have alot of sql queries in one php file? i am doing so because i need to get different data from many different tables.. am i doing the correct way? appreciate any advices. green given.
How could we possibly know without seeing your code? Generally, it's always the best to limit your amount of queries as much as possible. Often you can select data from multiple tables with one single query. That however depends on each case. (We don't know if this case applies to you without knowing more details.) It also depends on what your queries actually do, and how big your tables are, how your tables are structured/designed... There can be a LOT of difference.