SELECT aviName,MAX(dateTime) ,count(*) FROM aviTrackerMain WHERE
DATE(dateTime)
LIKE CONCAT(DATE(NOW()),'%') GROUP BY aviName;
This will also give you count of rows
On 7/31/08, Fish Kungfu <[EMAIL PROTECTED]> wrote:
>
> Using MySQL commands only (not PHP's mysql_num_rows), is there a way to
>
Using MySQL commands only (not PHP's mysql_num_rows), is there a way to
COUNT the number of rows returned from a SELECT.GROUP BY?
My primary SELECT query is this:
SELECT aviName,MAX(dateTime) FROM aviTrackerMain WHERE DATE(dateTime)
LIKE CONCAT(DATE(NOW()),'%') GROUP BY aviName;
And it faith
On Wed, 2008-07-30 at 14:42 -0400, Jerry Schwartz wrote:
> Is there any reasonable way of re-arranging the order of columns in a table
> without losing their data? The best I could come up with was to copy the
> table, empty it, and then do an INSERT . SELECT specifying the new order of
> the field
Something like
ALTER TABLE [TABLE] MODIFY [COLUMN] col_name column_definition
[FIRST | AFTER col_name]
shoudl work
http://dev.mysql.com/doc/refman/5.0/en/alter-table.html
On Wed, Jul 30, 2008 at 11:42 AM, Jerry Schwartz
<[EMAIL PROTECTED]> wrote:
> Is there any reasonable way of re-arranging the
Jerry Schwartz wrote:
Is there any reasonable way of re-arranging the order of columns in a table
without losing their data? The best I could come up with was to copy the
table, empty it, and then do an INSERT . SELECT specifying the new order of
the fields.
This can also be achieved in followi
Is there any reasonable way of re-arranging the order of columns in a table
without losing their data? The best I could come up with was to copy the
table, empty it, and then do an INSERT . SELECT specifying the new order of
the fields.
Regards,
Jerry Schwartz
The Infoshop by Global
that is a shell question using bash/ksh stuff you can use this:
mysql -uroot -pxxx -Dtest -s -e 'select * from amc_25;' > 1.txt 2>&1
Ananda Kumar wrote:
> The problem with below statement is that, if i there is any error in sql
> statements it does not get written to 1.txt. So, even
Thank u, this works.
On 7/30/08, Jim Lyons <[EMAIL PROTECTED]> wrote:
>
> Try:
>
> mysql -uroot -pxxx -Dtest -s -e 'select * from amc_25;' > 1.txt 2>
> 1.txt
>
> or
>
> mysql -uroot -pxxx -Dtest -s -e 'select * from amc_25;' > 1.txt 2>
> 1.errs
>
> This will redirect STDERR.
That worked for me, much appreciated.
Thanks
2008/7/30 Ananda Kumar <[EMAIL PROTECTED]>
> got to
>
> start-->run--(type regedit)-->HKEY_LOCAL_MACHINE--->SOFTWARE
> folder--->delete all mysql folder
>
> Then in SYSTEM Folder --->controlset001-->services---> delete all mysql
> entries. Do the same
got to
start-->run--(type regedit)-->HKEY_LOCAL_MACHINE--->SOFTWARE
folder--->delete all mysql folder
Then in SYSTEM Folder --->controlset001-->services---> delete all mysql
entries. Do the same for controlset002 and controlset003
After above is done try to delete the file in C:\mysql\bin folder
10 matches
Mail list logo