Topic: Coding PHP with MySQL.

Hey everyone.
I have just recently started coding PHP and now im onto MySQL. This is not really a problem but some general questions to any experienced programmer.

When coding pages with connections to a MySQL database, is it a problem to have alot of different SQL questions to the database?

On one of the pages i have 5 different questions collecting information from the database. Is this a problem?
If its not, when does it become a problem?

As i see it, the only possible reason can be the CPU usage. When does the page start to eat up alot of CPU usage?

Thanks alot for any answers or if you want more information, please ask again.

Re: Coding PHP with MySQL.

I've hade over 70 SQL queries on one of my first php pages, It wasn't really a problem but because there was not much traffic, I can tell you the gentime decreased a lot when i got it down to 5-10 wink

5 is not a problem. webForum.nu (vBulletin) uses 20-30 on many pages and they got pretty much traffic.


Re: Coding PHP with MySQL.

Thanks alot for that information, i was acctually afraid of my 6 queries on one page.

Are there any other programmers here who can offer any advice or suggestions?

Otherwise, thank you!


Re: Coding PHP with MySQL.

PHP with the backbone of MySQL is the greatest combo ever.

And Cactuz, why did you have 70 queries? You should have just used an array or join.

"You start coding. I'll go find out what they want." - Computer Analyst to Programmer