Re: [PHP-DB] Displaying SQL Results

2006-09-08 Thread JM
Thanks for the quick reply. Actually I figured it out by using aliasing: $sql_records = "SELECT MAX(user) AS user_name, email, COUNT(user) AS user_count FROM table_1 GROUP BY user DESC LIMIT 10;"; print $row["user_name"] . " - " . $row["user_count"]; This will display the top 10 users in desc

Re: [PHP-DB] postgresql, pg_pconnect issues, how to close connection properly

2006-09-08 Thread Ferencz-Csibi Attila
2006/9/8, Julian Tree <[EMAIL PROTECTED]>: I have a pretty complex data base that runs a lot of aggreated function (sum, count in addtion to joins) constantly. If I turn off pg_pconnect, the connection takes too long, if I turn on the pg_pconnect, the connection eventually max out. My current

RE: [PHP-DB] Displaying SQL Results

2006-09-08 Thread Bastien Koert
try while($row = $db->sql_fetchrow($result)) { //[INSERT CODE HERE, I want to display the 'user' and 'count'] $user = $row[0]; $count = $row[1]; } bastien From: JM <[EMAIL PROTECTED]> To: php-db@lists.php.net Subject: [PHP-DB] Displaying S

[PHP-DB] postgresql, pg_pconnect issues, how to close connection properly

2006-09-08 Thread Julian Tree
I have a pretty complex data base that runs a lot of aggreated function (sum, count in addtion to joins) constantly. If I turn off pg_pconnect, the connection takes too long, if I turn on the pg_pconnect, the connection eventually max out. My current solution is to have cron job to restart apac

[PHP-DB] Displaying SQL Results

2006-09-08 Thread JM
Hi all, Can anyone tell me what the syntax would be to display or gather the results of this SQL? SELECT MAX(user), COUNT(*) FROM my_table GROUP BY user ASC; $sql_records = "SELECT MAX(user), email, COUNT(*) FROM my_table GROUP BY user ;"; if($result = $db->sql_query($sql_records)) { // fetch a

[PHP-DB] PHP and MySQL on Windows causing severe slowdown

2006-09-08 Thread Diane
I just switched a customer from one Windows host to another. The new host is a Windows only shop, and not overly familiar with MySQL and PHP. My customer has two PHP applications, both important to the site. Everything else is ASP or ASP.NET. When the new host installed PHP and MySQL, the web

RE: [PHP-DB] sql output to a multidimensional array

2006-09-08 Thread K.A.Bouton
> -Original Message- > From: Chris [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 07, 2006 9:52 PM > To: K.A.Bouton > Cc: php-db@lists.php.net > Subject: Re: [PHP-DB] sql output to a multidimensional array > > > K.A.Bouton wrote: > > I need the output of my sql to be a multidime