Archive for January, 2009

php and mysql
rebeca L asked:


Hi, I have a project to submit to my supervisor. It’s a TOR (Term of Reference), I am planning to do a discussion forum and I must explain what will be the resources used. I choose that I will use PHP and mySQL but I don’t know how to explain why? what is the “play” of php and mysql in a discussion forum. Thank you for helping me very quickly, it’s quite an emergency!!!

Tags: , ,
php and mysql
pbinfinity asked:


I am trying to find out the correct most efficient way to deal with mysql connections in PHP. My goal is to make sure I do not run out of connections. I have read that using persistent connections is a way to run out of connections if you have too many users. If opening and closing connections is not time intensive, will that be a better way to manage them?

Example:
$conn = mysql_connect(…);
mysql_select_db(…, $conn);

$info = mysql_query($query, $connection);

/* do a bunch of stuff to render the results to the screen */

mysql_close($conn);

If there is a lot of work to render to the screen, is it a better deal to save the query results off to another variable, free the resource memory and then close the connection before ever rendering to the screen?

Code examples would help, and documentation about how you know it is the best way is also preferred.

Thanks.

Tags: , ,
Learn PHP
D-A asked:


I have no idea where I should go to get knowledge about all of the aspects of website building, securing a website, transferring websites, coding a website, all of the codes for websites, etc. I feel like a lost fish.

Tags: , ,
Back to top