Mountain Water Posted December 30, 2009 Share Posted December 30, 2009 mysql_query("SELECT pm from users WHERE id = $_SESSION['user_id'];"); I run this every refresh, so if a user has a new message i got more functions for it to display a "NEW MESSAGE WINDOW" will this kill my site? i got 20gb bandwidth and 2b space/month, 3.95?month Quote Link to comment https://forums.phpfreaks.com/topic/186637-will-this-kill-my-site/ Share on other sites More sharing options...
mikesta707 Posted December 30, 2009 Share Posted December 30, 2009 depends on how much traffic your site gets. if your site starts slowing you may want to get more space/bandwidth Quote Link to comment https://forums.phpfreaks.com/topic/186637-will-this-kill-my-site/#findComment-985715 Share on other sites More sharing options...
Mountain Water Posted December 30, 2009 Author Share Posted December 30, 2009 but like isn't this how forums supposed to be coded i mean i set them to $_SESSIONs so i dont have to select username each refresh.. but now sence i added private messaging system i need to select pm from user = $_SESSION['user_id'] but i dont want to run this each time a user refreshes on my site, maybe only show it when they go to the main page? Quote Link to comment https://forums.phpfreaks.com/topic/186637-will-this-kill-my-site/#findComment-985716 Share on other sites More sharing options...
.josh Posted December 30, 2009 Share Posted December 30, 2009 querying the db does not suck up bandwidth when your db is on your server. Are you connecting to a remote db? Quote Link to comment https://forums.phpfreaks.com/topic/186637-will-this-kill-my-site/#findComment-985719 Share on other sites More sharing options...
Mountain Water Posted December 30, 2009 Author Share Posted December 30, 2009 querying the db does not suck up bandwidth when your db is on your server. Are you connecting to a remote db? No, my own.. Im on shared hosting tho. But i get 20gb/month I havn't even used 100mb lol Quote Link to comment https://forums.phpfreaks.com/topic/186637-will-this-kill-my-site/#findComment-985732 Share on other sites More sharing options...
justAnoob Posted December 30, 2009 Share Posted December 30, 2009 move up to a deluxe hosting account if you can, that is what I did. Usually does not cost that much more. Quote Link to comment https://forums.phpfreaks.com/topic/186637-will-this-kill-my-site/#findComment-985737 Share on other sites More sharing options...
Mountain Water Posted December 30, 2009 Author Share Posted December 30, 2009 move up to a deluxe hosting account if you can, that is what I did. Usually does not cost that much more. Your name fits u well. Quote Link to comment https://forums.phpfreaks.com/topic/186637-will-this-kill-my-site/#findComment-985741 Share on other sites More sharing options...
.josh Posted December 30, 2009 Share Posted December 30, 2009 well then as I mentioned before, script querying your db != bandwidth consumption. However, requesting the page itself (user refreshing), will consume bandwidth. Quote Link to comment https://forums.phpfreaks.com/topic/186637-will-this-kill-my-site/#findComment-985742 Share on other sites More sharing options...
Mountain Water Posted December 30, 2009 Author Share Posted December 30, 2009 well then as I mentioned before, script querying your db != bandwidth consumption. However, requesting the page itself (user refreshing), will consume bandwidth. Total Size: My Index is 12578 bytes Quote Link to comment https://forums.phpfreaks.com/topic/186637-will-this-kill-my-site/#findComment-985746 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.