Re: [PHP-DB] Date formatting question

2009-04-08 Thread Phpster
See the date function Http://www.php.net/date Bastien Sent from my iPod On Apr 8, 2009, at 21:41, Jack Lauman wrote: I need to reformat the output of the 'dates' field from '2009-04-08' to 'Wed. Apr. 8th'. Any help would be appreciated. Thanks. --- for ($counter = 0; $counter < mysql_n

Re: [PHP-DB] Date formatting question

2009-04-08 Thread Chris
Jack Lauman wrote: I need to reformat the output of the 'dates' field from '2009-04-08' to 'Wed. Apr. 8th'. Any help would be appreciated. You can either do it using mysql date formats (see http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_date-format) or something

[PHP-DB] Date formatting question

2009-04-08 Thread Jack Lauman
I need to reformat the output of the 'dates' field from '2009-04-08' to 'Wed. Apr. 8th'. Any help would be appreciated. Thanks. --- for ($counter = 0; $counter < mysql_num_rows($resultID); $counter++); while ($row = mysql_fetch_object($resultID)) { print ""; print "" . $row->dates . "

[PHP-DB] Fix your corrupted tables / ibdata1 problem

2009-04-08 Thread Hassan
Dear everyone, I just love list and I think I should share this information on how to fix MySQL tables that are in use and according to the articles: http://articles.techrepublic.com.com/5100-10878_11-5193721.html and http://tgrove.com/2007/12/02/innodb-operating-system-error-number-13-in-a-fi

[PHP-DB] Fix your corrupted tables / ibdata1 problem

2009-04-08 Thread Hassan
Dear everyone, I just love list and I think I should share this information on how to fix MySQL tables that are in use and according to the articles: http://articles.techrepublic.com.com/5100-10878_11-5193721.html and http://tgrove.com/2007/12/02/innodb-operating-system-error-number-13-in-a-fil

Re: [PHP-DB] Get ID of ROW when using aggregate functions

2009-04-08 Thread kesavan trichy rengarajan
there is probably a better way to achieve this, but, this is a quick solution mysql> SELECT * FROM test where sallary IN (SELECT MAX(SALLARY) FROM test GROUP BY company); +++---+-+ | id | name | company | sallary | +++---+-+ | 2 | Peter

Re: [PHP-DB] Get ID of ROW when using aggregate functions

2009-04-08 Thread Jack van Zanen
the answer is exactly what you asked for. It gave you the max salary per company and made a "lucky guess" (not really, alfabetically first) as to which name you wanted since you never specified this of the top of my head, try this. SELECT a.id,a.name,a.company,a.sallary FROM `test` a ,(select com

[PHP-DB] Get ID of ROW when using aggregate functions

2009-04-08 Thread Ondrej Kulaty
Hi, I have following table: id int(11) name varchar(255) company varchar(255) sallary int(11) CREATE TABLE `test` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `company` varchar(255) NOT NULL, `sallary` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAUL

[PHP-DB] Re: mysqli_multi_query error tolerance

2009-04-08 Thread Filipe Martins
Thanks again for responding. I'd also welcome opinions from other members of this list... Chris writes: > Filipe Martins wrote: >> Thanks for responding, Chris. >> If I understand you right, you're saying that this is MySQL API >> issue, right? > > I assume it's handled by the database itself a