From: "Gustavo Andrade"
> select count(distinct membros.ID) as total_membros, count(distinct
> replays.ID) as total_replays, count(distinct downloads.ID) as
> total_downloads from membros,replays,downloads;
Why join three tables to count the records in each one? I'm sure the
performance will be po
select count(distinct membros.ID) as total_membros, count(distinct
replays.ID) as total_replays, count(distinct downloads.ID) as
total_downloads from membros,replays,downloads;
if one of the tables have 0 records all the counts will turn to 0
the count works only if all the tables have records
ho
From: "Paul DuBois"
> At 17:50 -0500 5/16/04, Paul DuBois wrote:
>
> Not a huge difference, I guess. But I suppose if a query that
> uses one or the other of these expressions processes a large number
> of rows, it might pay to run some comparative testing.
>
Another interesting point is whether
David Blomstrom wrote:
--- Roger Baklund <[EMAIL PROTECTED]> wrote:
use test;
Yikes - you lost me on the second word!
Are you talking about the sort of "test" that's
described on this page?:
http://dev.mysql.com/doc/mysql/en/running_mysqltest.html
No. "use test" tells mysql to work in the test d
Hi,
Is it possible to setup MySQL in french ?
For example, when I write and execute "SELECT monthname(mydate) from
mytable", it return the month name of "mydate" (march, april, may,
).
I'd like it return "mars, avril, mai,." = the month is french.
So, is it possible ?
How ?
Thank for yo
SHOW TABLE STATUS to get the count of each table, then your application adds
the number in the Rows field from each of the tables returned.
DVP
Dathan Vance Pattishall http://www.friendster.com
> -Original Message-
> From: Gustavo Andrade [mailto:[EMAIL PROTECTED]
> Sent: Sunda
Is it really nobody has similar experience?
- Forwarded by Joseph S CHUNG/ITSD/HKSARG on 2004-05-17 09:46 -
[EMAIL PROTECTED]
--- Roger Baklund <[EMAIL PROTECTED]> wrote:
> use test;
Yikes - you lost me on the second word!
Are you talking about the sort of "test" that's
described on this page?:
http://dev.mysql.com/doc/mysql/en/running_mysqltest.html
> create table pct (red int,blue int,gray int);
> insert into pct v
On Sun, 16 May 2004 16:02:06 -0700
Ron Gilbert <[EMAIL PROTECTED]> wrote:
> If I switch to 5.0, are there any issues with PHP? Will my 4.2.2
> version of PHP work just fine with 5.0? I also have a Windows C++
> program that talked to mysql over the Internet via the C API, will
> it still work
At 17:50 -0500 5/16/04, Paul DuBois wrote:
At 0:38 +0200 5/17/04, John Fawcett wrote:
From: "Paul DuBois"
You're right. You'd have to apply YEAR() to
FROM_UNIXTIME(UNIX_TIMESTAMP(arg)).
and you can avoid YEAR() altogether by using a
format string. in FROM_UNIXTIME()
Right again. :-)
I was curiou
I want to know if its possible to count the total records of multiple
tables:
Example: I have 3 tables. I want to know the total records of each table
using only 1 query.
Is that possible?
_
Quer ter um fórum para seu clan de Starcraft/BroodWar, C
If I switch to 5.0, are there any issues with PHP? Will my 4.2.2
version of PHP work just fine with 5.0? I also have a Windows C++
program that talked to mysql over the Internet via the C API, will it
still work after the 5.0 (or the 4.1.1) upgrade? I'm not doing anything
fancy with it.
Oth
* David Blomstrom
> Suppose you have a table with four columns. The first
> three colums each list a numeral, and the fourth
> column lists the sum of those numerals, like this:
>
> 3 | 3 | 4 | 10
> 10 | 10 | 5 | 25
>
> Now, suppose you wanted to also display those numerals
> as percentages:
>
> Re
At 0:38 +0200 5/17/04, John Fawcett wrote:
From: "Paul DuBois"
You're right. You'd have to apply YEAR() to
FROM_UNIXTIME(UNIX_TIMESTAMP(arg)).
and you can avoid YEAR() altogether by using a
format string. in FROM_UNIXTIME()
Right again. :-)
--
Paul DuBois, MySQL Documentation Team
Madison, Wisco
From: "T. H. Grejc"
> I'm creating news archive and it should be sorted by months:
>
> January 2004 (news count is 56)
> February 2004 (48)
> ...
So you need to use GROUP BY and COUNT.
The format is like this:
select monthandyear,count(othercolumn) from t
group by monthandyear
in your case mon
From: "Paul DuBois"
> You're right. You'd have to apply YEAR() to
> FROM_UNIXTIME(UNIX_TIMESTAMP(arg)).
and you can avoid YEAR() altogether by using a
format string. in FROM_UNIXTIME()
John
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http:/
At 0:25 +0200 5/17/04, John Fawcett wrote:
From: "Paul DuBois"> At 22:27 +0200 5/16/04,
John Fawcett wrote:
>Year does not operate on a unix timestamp.
Sure it does:
mysql> select t, year(t) from tsdemo1;
++-+
| t | year(t) |
++-+
John Fawcett wrote:
From: "T. H. Grejc"
How can I add more fields to query. If I write:
SELECT DISTINCT FROM_UNIXTIME(created, '%Y %M'), other_field FROM
table_name ORDER BY created DESC
I loose distinction (all dates are displayed).
TNX
I don't think distinction is lost. All the rows should still
From: "Paul DuBois"> At 22:27 +0200 5/16/04,
John Fawcett wrote:
> >Year does not operate on a unix timestamp.
>
> Sure it does:
>
> mysql> select t, year(t) from tsdemo1;
> ++-+
> | t | year(t) |
> ++-+
> | 20010822133241 |2001 |
>
From: "T. H. Grejc"
> How can I add more fields to query. If I write:
>
> SELECT DISTINCT FROM_UNIXTIME(created, '%Y %M'), other_field FROM
> table_name ORDER BY created DESC
>
> I loose distinction (all dates are displayed).
>
> TNX
>
I don't think distinction is lost. All the rows should still be
Paul DuBois wrote:
At 22:27 +0200 5/16/04, John Fawcett wrote:
From: "T. H. Grejc"
Hello,
I'm trying to select all distinct years from a unixtimestamp field in
MySQL database (3.23.56). I have a query:
SELECT DISTINCT YEAR(date_field) As theYear FROM table
but PHP gives me an empty array. What
At 13:51 -0700 5/16/04, Ron Gilbert wrote:
I am going to upgrade from 3.23 and was wondering if 4.1.1 is stable
enough? This is just for some personal websites, nothing mission
critical, but on the other hand, I don't want to deal with endless
problems.
The reason that I'd like to go to 4.1.1
John Fawcett wrote:
From: "T. H. Grejc"
Hello,
I'm trying to select all distinct years from a unixtimestamp field in
MySQL database (3.23.56). I have a query:
SELECT DISTINCT YEAR(date_field) As theYear FROM table
but PHP gives me an empty array. What am I doing wrong?
TNX
I think you need this f
At 22:27 +0200 5/16/04, John Fawcett wrote:
From: "T. H. Grejc"
Hello,
I'm trying to select all distinct years from a unixtimestamp field in
MySQL database (3.23.56). I have a query:
SELECT DISTINCT YEAR(date_field) As theYear FROM table
but PHP gives me an empty array. What am I doing wrong?
On Sun, 16 May 2004 13:51:29 -0700
Ron Gilbert <[EMAIL PROTECTED]> wrote:
>
> I am going to upgrade from 3.23 and was wondering if 4.1.1 is stable
>
> enough? This is just for some personal websites, nothing mission
> critical, but on the other hand, I don't want to deal with endless
> proble
I am going to upgrade from 3.23 and was wondering if 4.1.1 is stable
enough? This is just for some personal websites, nothing mission
critical, but on the other hand, I don't want to deal with endless
problems.
The reason that I'd like to go to 4.1.1 is for sub-selects, otherwise
I'd stick to
Alright, I've finally got table joins figured out, and
I'm now wrestling with a more advanced operation...
Suppose you have a table with four columns. The first
three colums each list a numeral, and the fourth
column lists the sum of those numerals, like this:
3 | 3 | 4 | 10
10 | 10 | 5 | 25
Now
From: "T. H. Grejc"
> Hello,
>
> I'm trying to select all distinct years from a unixtimestamp field in
> MySQL database (3.23.56). I have a query:
>
> SELECT DISTINCT YEAR(date_field) As theYear FROM table
>
> but PHP gives me an empty array. What am I doing wrong?
>
> TNX
>
I think you need
In the Db table I've got an entry for Db = test, user = dummy, host = ''.
In the Host table I've got several entries for Db = test with different Host
entries, one of which is localhost. Another is an IP on the same server
that's running mysqld. Another is a remote host.
I've got skip-networking
R u sure your printing out the correct array (hash) field? Did you connect
to the db? Is mysql_error reporting an error?
DVP
Dathan Vance Pattishall http://www.friendster.com
> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of T. H. Grejc
> Sent: Sunday, Ma
Hello,
I'm trying to select all distinct years from a unixtimestamp field in
MySQL database (3.23.56). I have a query:
SELECT DISTINCT YEAR(date_field) As theYear FROM table
but PHP gives me an empty array. What am I doing wrong?
TNX
--
MySQL General Mailing List
For list archives: http://lists.my
Never mind.
Didn't have 'localhost' in Db table 'Host' field for the database.
> I've got a user, joe, who has all privileges on database 'joe' except GRANT.
> I gave permissions to joe using this command:
> GRANT ALL ON joe TO [EMAIL PROTECTED]
>
> But if I'm logged in as joe to the joe db a
I've got a user, joe, who has all privileges on database 'joe' except GRANT.
I gave permissions to joe using this command:
GRANT ALL ON joe TO [EMAIL PROTECTED]
But if I'm logged in as joe to the joe db and try to create a table, I get
the error:
ERROR 1142: create command denied to user: '[E
On May 16, 2004, at 1:15 AM, Ron Gilbert wrote:
I have a table that is:
CREATE TABLE GPSData (
ID int(10) unsigned NOT NULL auto_increment,
Lat decimal(9,5) default '0.0',
Lon decimal(9,5) default '0.0',
TDate datetime default NULL,
PRIMARY KEY (ID),
UNIQUE KEY ID (ID),
KEY ID
Ron Gilbert <[EMAIL PROTECTED]> writes:
>It currently takes 15 or 20 minutes to run though a 10K to 20K GPS track
>logs. This seems too long to me. I took out the INSERTS to just to
>make sure it wasn't my PHP scripts, and they run in a few seconds
>without the MySQL calls.
Doing a lot of ins
"Per Andreas Buer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> "Joshua Beall" <[EMAIL PROTECTED]> writes:
>
> > "Daniel Kasak" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> >> Is there any particular reason why you think the table will need
> >> optimizing, or
"Joshua Beall" <[EMAIL PROTECTED]> writes:
> "Daniel Kasak" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> Is there any particular reason why you think the table will need
>> optimizing, or do you just want everything to be super-optimized?
>
> Because when I pull up phpMyAdmin,
> data points. I don't want duplicate entries, mostly due to sections of
> the log accidentally being uploaded twice. I am currently doing a
Ok, so it is EXACTLY the same data that might be inserted twice?
- Make a UNIQUE index for the relevant column(s) that uniquely identify a
record.
- Use "
on 05/16/2004 01:15 AM, bruce at [EMAIL PROTECTED] wrote:
> but this brings to mind a question. is it possible to have multiple users
> accessing the phpMyAdmin app, with each having different access rights for
> different databases/tables...??
Yes, that's exactly what it does, you basically assi
scott...
thanks..i'll take a look...
but this brings to mind a question. is it possible to have multiple users
accessing the phpMyAdmin app, with each having different access rights for
different databases/tables...??
if this gets confusing, can i bring the questions back to this list..???
and
on 05/16/2004 12:52 AM, bruce at [EMAIL PROTECTED] wrote:
>
> i'm running rh 8.0 with mysql on a test system. i'm relatively new to the
> admin functions of mysql. another person setup the mysql on the system.
>
> in reviewing the setup, it appears that mysql was setup with using root, and
> the
hi...
i'm running rh 8.0 with mysql on a test system. i'm relatively new to the
admin functions of mysql. another person setup the mysql on the system.
in reviewing the setup, it appears that mysql was setup with using root, and
the root password. when i look at phpMyAdmin, it is also setup using
42 matches
Mail list logo