Distinct max() and separate unique value

2009-10-20 Thread Eric Anderson
I'm trying to formulate a query on a Wordpress database that will give me the highest 'object_id' with the highest 'term_taxonomy_id', something like: +-+--+ | max(distinct object_id) | term_taxonomy_id | +-+--+

Re: Distinct max() and separate unique value

2009-10-20 Thread Eric Anderson
On Tue, 20 Oct 2009, DaWiz wrote: I would try: select max(object_id), term_taxonomy_id group by term_taxonomy_id order by term_taxonomy_id; max(column) returns a single value so distinct is not needed. The group by and order by should only have columns thaqt are displayed and that are not

Copying tables between databases

2008-10-09 Thread Eric Anderson
into Bar via cron. Is there a way to set up real-time replication of that table? -- WANT TO MODEL FOR MAC BUMBLE? APPLY AT http://casting.macandbumble.com - Eric Anderson Mac and Bumble Bumble Cash ICQ

Re: Replication

2006-10-06 Thread Eric Anderson
- Eric Anderson Mac and Bumble Bumble Cash ICQ 3849549 http://www.macandbumble.com http://www.bumblecash.com San Diego, CA[EMAIL PROTECTED] [EMAIL PROTECTED

Replication

2006-10-05 Thread Eric Anderson
- Eric Anderson Mac and Bumble Bumble Cash ICQ 3849549 http://www.macandbumble.com http://www.bumblecash.com San Diego, CA[EMAIL PROTECTED] [EMAIL PROTECTED] - SEE OUR LATEST PARTY

Re: solaris build mysql from source using gcc

2006-09-01 Thread Eric Anderson
Well if you'd share your specific problem I'm sure someone can help, but more importantly why are you building from source anyway? There are binary builds for most Solaris platforms, including 2.10. Sorry I meant 10 theremy solaris experience comes from the 'old days' before they went and

MERGE table problem

2006-08-24 Thread Eric Anderson
I've got a master (Master) with a MERGE table of foo_t (comprising of bar_a, bar_b, bar_c) in database 'Igloo'. There are 5 slaves that replicate the Igloo table, but ignore the Igloo.foo_t table. This setup was working fine. If the Master server crashed or had a prblem for some reason,

Slave to multiple masters?

2005-12-28 Thread Eric Anderson
. -- - Eric Anderson Mac and Bumble Bumble Cash ICQ 3849549 http://www.macandbumble.com http://www.bumblecash.com San Diego, CA[EMAIL PROTECTED] [EMAIL PROTECTED

Replacted MERGE table?

2005-04-05 Thread Eric Anderson
Here's a question for you guys: is it possible to have a replicated table of type MERGE? Scenario: Server: WWW1 Table: A.local_table (MASTER) replicates to: Server: MEMBERS Table: B.www1 (SLAVE) and Server: WWW2 Table: A.local_table (MASTER) replicates to: Server: MEMBERS Table: B.www2 (SLAVE)

Date query question

2004-01-10 Thread Eric Anderson
I don't have much experience working with dates in Mysql; I've always prefered to manage dates in code, so bear with me. I've got the following definition (yes, no indexes right now): CREATE TABLE se_t ( datestamp timestamp(14) NOT NULL, remote_addr char(16) NOT NULL default '',

Very strange problem

2003-11-07 Thread Eric Anderson
A little explaination: We've got two servers, e450 (3.23.47) and 1U (4.0.14). These two machines have a private connection between them (192.168.0.1 and 192.168.0.2). The e450 is the master server, and the 1U has a copy (no replication) of some basic data, so it can run server-intensive pages.

RE: Very strange problem

2003-11-07 Thread Eric Anderson
Is anything being logged in the error log? Nope. My 'wait_timeout' was set to 120 seconds, I reduced that down to 60 seconds but I don't think that will help because once it gets stuck in this blocked thread thing, it never recovers.. any subsequent connections never actually process, until the

This is confusing..?

2003-11-06 Thread Eric Anderson
Given the following table: CREATE TABLE campaign_t ( acct_id int(11) unsigned NOT NULL default '0', site_id tinyint(3) unsigned NOT NULL default '0', ref_id int(11) unsigned NOT NULL default '0', datestamp char(10) NOT NULL default '', raws int(11) unsigned NOT NULL default '0',

RE: This is confusing..?

2003-11-06 Thread Eric Anderson
Can you send show keys from campaign_t. I bet you can solve your problem by running analyze table. What's the syntax for 'show keys'? -- -- Eric Anderson - ICQ: 3849549 - San Diego, CA [EMAIL PROTECTED] | Mac and Bumble

Re: This is confusing..?

2003-11-06 Thread Eric Anderson
Possibly because datestamp and 20041105 have different datatypes. There's an implicit data conversion required for the comparison, which in some cases prevents use of an index. Try writing '20041105' rather than 20041105 and see if that makes a difference. Nope.. :-/ mysql explain SELECT *

RE: This is confusing..?

2003-11-06 Thread Eric Anderson
Can you send show keys from campaign_t. I bet you can solve your problem by running analyze table. mysql show index from campaign_t\g +++---+--+-+---+-+--++-+ | Table | Non_unique | Key_name

Excluding records?

2002-12-19 Thread Eric Anderson
If I've got the following two tables: CREATE TABLE password_log ( time_stamp int(11) unsigned NOT NULL default '0', remote_host char(15) NOT NULL default '', remote_user char(50) NOT NULL default '', status smallint(5) unsigned NOT NULL default '0', PRIMARY KEY

Can someone explain this?

2002-12-05 Thread Eric Anderson
. -- - Eric Anderson Wild Web Amateurs CyberIron Bodybuilding ICQ 3849549 http://www.wildwebamateurs.com http://www.cyberiron.com San Diego, CA[EMAIL PROTECTED] [EMAIL PROTECTED

MySQL connect failure

2002-11-18 Thread Eric Anderson
I will occasionally get the following message in some of my cronjobs: Mysql-connect(database=mb_pw;host=localhost) failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (146) at /usr/home/members/filter/Filter.exe line 15 Can't connect to local MySQL server through

Mysql SELECT question (LEFT JOIN?)

2002-11-14 Thread Eric Anderson
Assume two tables: CREATE TABLE block_ip ( datestamp int(11) NOT NULL default '0', remote_addr char(15) NOT NULL default '', PRIMARY KEY (remote_addr), KEY datestamp (datestamp) ) TYPE=MyISAM; CREATE TABLE brute_force ( datestamp int(11) NOT NULL default '0', remote_addr char(15)

Re: Crashing under high load

2002-08-02 Thread Eric Anderson
. -- - Eric Anderson Wild Web Amateurs CyberIron Bodybuilding ICQ 3849549 http://www.wildwebamateurs.com http://www.cyberiron.com San Diego, CA[EMAIL PROTECTED] [EMAIL PROTECTED

RE: MySQL hardware concerns

2002-07-30 Thread Eric Anderson
. -- - Eric Anderson Wild Web Amateurs CyberIron Bodybuilding ICQ 3849549 http://www.wildwebamateurs.com http://www.cyberiron.com San Diego, CA[EMAIL PROTECTED] [EMAIL PROTECTED

RE: SELECT .. OR from multiple tables

2001-08-15 Thread Eric Anderson
but in this case it's not a big deal - it's not a high-volume transaction. Thanks everyone for all your help and suggestions. -- Eric Anderson Online Net-Entertainment, Inc CyberIron Bodybuilding ICQ 3849549 http://www.on

SELECT .. OR from multiple tables

2001-08-14 Thread Eric Anderson
if that row exists in either table in one SQL call. Maybe it's just me today.. Anyone? -- Eric Anderson Online Net-Entertainment, Inc CyberIron Bodybuilding ICQ 3849549 http://www.on-e.comhttp

Re: SELECT .. OR from multiple tables

2001-08-14 Thread Eric Anderson
Your query will work in every case, EXCEPT when either Current or Temporary has 0 rows, because then there's nothing to join. I'm not sure if doing a join is a clean way of doing this though. If you know that Current will never be empty (but temporary might be), then this query would work:

One-way data transfer

2001-04-04 Thread Eric Anderson
Let's say I've got a database on primary server (cluster1) and periodically I need to purge data from it to a remote archive database. What's the best way? I thought about replication, but I don't want the data to stick around in the cluster1 database. Is a dump via SSH the best/easiest way?

Mysql and NAS?

2001-01-12 Thread Eric Anderson
I've done quite a bit of searching but I've not run across any experiences with multiple Mysql servers running on separate computers using the same data files off a NAS server. Anyone? - Before posting, please check: