----- Original Message -----
From: "Darryle Steplight" <[EMAIL PROTECTED]>
To: "MySql" <[EMAIL PROTECTED]>
Cc: <mysql@lists.mysql.com>
Sent: Tuesday, September 09, 2008 6:59 PM
Subject: Re: Weird problem with mysql_query
Hi G,
There is nothing weird about your results. When you do a Count(*)
without a GROUP BY(someColumn) you are essentially asking MySQL how
many rows are present in the table. But when you do use Group By
someColum , you are asking MySql how many rows do I have of
"someColumn" . It's just a good practice to use GROUP BY when you
want to a count of a specific column .
mysql> select count(*) as 'Count' from logins GROUP BY dawiz
I found my problem - it turned out to be a misconception on my part; I was
using sprintf(buf,"%d", row[i]) if it was a numeric field - this was
printing the address rather than the value. Apparently even though the
data
is type MYSQL_TYPE_LONGLONG it should be treated as char.
G Vaughn
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]