rajivgonsalves Posted October 31, 2007 Share Posted October 31, 2007 ok here is my problem my client has request that when a user login to the site a mysql link(resource) should be created at the start and only destroyed when the user logs out I tried many ways (storing it in a session etc) they requested that they do not want to use mysql_pconnect() functions basically they want one link for one user when user ends the session it should be destroyed is this possible I searched on google but could not find anything can anyone help Quote Link to comment https://forums.phpfreaks.com/topic/75517-solved-storing-mysql-resource-link-somewhere-so-it-can-be-used-in-the-user-session/ Share on other sites More sharing options...
ToonMariner Posted October 31, 2007 Share Posted October 31, 2007 just use mysql_pconnect if this is to avoid teh overhead of connecting to teh mysql server on each request then perhaps have a look at using the mysqli library Quote Link to comment https://forums.phpfreaks.com/topic/75517-solved-storing-mysql-resource-link-somewhere-so-it-can-be-used-in-the-user-session/#findComment-382035 Share on other sites More sharing options...
trq Posted October 31, 2007 Share Posted October 31, 2007 A resource cannot be serialized, so basically, there is no way of achieving this. Quote Link to comment https://forums.phpfreaks.com/topic/75517-solved-storing-mysql-resource-link-somewhere-so-it-can-be-used-in-the-user-session/#findComment-382039 Share on other sites More sharing options...
rajivgonsalves Posted October 31, 2007 Author Share Posted October 31, 2007 thanks guys I told my client the same thing was just confirming so that they do not get on my head [sOLVED] Quote Link to comment https://forums.phpfreaks.com/topic/75517-solved-storing-mysql-resource-link-somewhere-so-it-can-be-used-in-the-user-session/#findComment-382048 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.