Jump to content

2oMst

Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling
  • Location
    France, Cannes

2oMst's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. ahh !! yes, very nice GROUP BY power I\'ll experiment with group by, thank you. ps: anyone know of any good sites showing all the syntax you can put into a mysql_query ... ?? (besides mysql.com)
  2. So to summarize .. holiks says it would be better for me to use pconnect since I do lot\'s of connection in the page, and there isn\'t a single page, that doesn\'t require a query. For akitchin: www.php.net says: By reading the definition of pconnect on php.net, it looks like it works almost like a session but for MySQL but does it close if the user closes the web browser ?? Or does it stay open for other visitors ?? I also found this part on php.net that pretty much answers most of my questions: So if someone is browsing the webpage and idles for 3-5min, i believe that the connection will still be active, causing a +1 on the connection limit. I will propably do mysql_connect at the beginning and mysql_close at the end for now. If anyone can add anything on pconnect would be greatly appreciated. Thank you
  3. I have a community website and I do lots of different queries at different times in the webpage. 1. Is it better to open and close a MySQL connection everytime I need to gather info on the db with mysql_connect and mysql_close or to open it in the beginning and close it at the end of the page? (Knowing that i can have up to 20 group queries in one page) 2. If it\'s better to open it at the beginning and close it at the end, would it be better to use mysql_connect or mysql_pconnet ?? Could someone answer these questions mentionning why it\'s the best solution. (rendering speed, security, traffic ... )
  4. You can also try registering a new user in your different programs and see what information it enters. All you\'ll have to do is reenter these information on your main signup form. Synchronizing being auth on those applications should be the hard part. I never looked how it worked on phpbb for exemple but you can probably find the source of the authing and had it to your main one.
  5. if you did the entire community site i don\'t see why you have trouble linking everything, it should be the easy part. Try posting the url of your website so we can see how it all works out and figure out a solution. For exemple, for phpBB, you should just add: mysql_query(\"INSERT INTO phpbb_users VALUES (\'\',\'\',\'\'.....)\"); During your main registration system. Try this one out for phpBB. The others i don\'t know the scripts so can\'t help you out[/i]
  6. Ok i tried helping out a guy about a ranking system he tried to do on his site and couldn\'t quite get the query working. What I want: I have a forum_1_msg table with a user column. I would like to have a ranking system of the most posts. A post = 1 row in that table. In theory: Display every user once, using DISTINCT and count how many times this user has posted on the forum, and then sort it. A few queries I tried: mysql_query("SELECT DISTINCT user, count(user) AS nbr_posts FROM forum_1_msg ORDER BY nbr_posts DESC"); mysql_query("SELECT GROUP_CONCAT(DISTINCT user) AS cur_user, GROUP_CONCAT(count(cur_user)) AS nbr_posts FROM forum_1_msg ORDER BY nbr_posts DESC"); I tried many other queries, the number 1 I thought would be the most accurate. After reading the doc on mysql.com I thought the number 2 query would be more appropriate but hey .... Both don\'t work. Any help here ??? PS: I know this is not the best way for this to work but it\'s mainly for educational purpose on mysql_querying Thank you
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.