You can use msqli_connect to a database - notice the 'i' after mysql. It stands for improved and is considered a more secure and stable way to connect to databases over the older mysql_connect.
Though I've found that I need to do some garbage collection after using it because it opens a thread which is left open for about 2 days to the database which quickly results in all my threads being used - that sucks!
Anyway although you can adjust this setting from within mysql itself I always prefer to code defensively so would recommend that you use the 'thread' services to get the thread id and then kill it when you're done.
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|