Re: replicating only certain tables?

2004-03-30 Thread Chris Petersen
You can restrict logging only on the database level with binlog-do-db/binlog-ignore-db options: http://www.mysql.com/doc/en/Binary_log.html I don't want to restrict logging, only replication. I think I figured it out, though, despite the fact that the documentation is completely

Re: replicating only certain tables?

2004-03-30 Thread Chris Petersen
Agreed that the replication section could be written more clearly, but is not the information you are looking for in section 6.3 Replication Implementation Details, section 6.6 features problems, 6.7 startup options and 6.8 FAQ? You must be reading a different manual than me

replicating only certain tables?

2004-03-29 Thread Chris Petersen
I'm trying to set up two-way replication between our colo and our office (slow DSL line), so our web customers can get the fast speeds of our colo, and the people in the office can also get the fast speeds of our internal network. Since our colo machine is logging customer shopping cart info

replication question

2003-07-08 Thread Chris Petersen
I work for a small (but very fast-growing) company, and we're about to start deploying our new website. Because it has a live inventory setup, and because our internal tools are so integrated with the ecommerce side of things, I figure that replication is the best tool for us - we'd have a fast

setup/DBI issues...

2002-02-01 Thread Chris Petersen
ok, after several months away from working with mysql, I figured I should get back into things.. anyway, the server is up and running, and I can access it with the mysql client, but I get an unknown error whenever I try to connect to it via perl DBI... I'm using: DBI-connect(DBI:mysql:$UserID,

Re: setup/DBI issues...

2002-02-01 Thread Chris Petersen
I did. it dies with unknown error - hence my confusion. and for those who didn't catch it, the userid and database name are identical (hence the double usage of $UserID in the connect parameters).. -Chris On Fri, 1 Feb 2002, Colin Faber wrote: To: Chris Petersen [EMAIL PROTECTED] From

repetition-operator operand invalid error?

2001-07-04 Thread Chris Petersen
I recently started getting this error from a query: Got error 'repetition-operator operand invalid' from regexp (SELECT id, IF(parents LIKE '_%',CONCAT(parents,' name),name) AS name, usergrp FROM Categories WHERE id 10 AND id AND parents NOT RLIKE '^\* New Category \*(|$)' ORDER

Good book for MySQL and Perl DBI?

2001-06-23 Thread Chris Petersen
Does anyone have any recommendations for a good book on MySQL SQL? What about PerlDBI (I noticed that the O'Reilly one is over a year old)? Just realizing that there's so much out there that I haven't been told... -Chris -

Re: any size limitation as to the size of a query statement?

2001-06-21 Thread Chris Petersen
Why not do something like: my $q = DELETE FROM master WHERE master_id NOT IN (; $q .= join(',', @masteridarray); $q .= ')'; $dbi_dbh-do($q); Though this will obviously fall into the same size limitations that you were doing, but it should execute a lot faster, and be a bit

Re: any size limitation as to the size of a query statement?

2001-06-21 Thread Chris Petersen
here, @ids is the array, delete in chunks of 64: while ( my(@id)= splice(@ids,0,64)) { $qry=DELETE FROM master WHERE master_id in (.join(',',@id).); SQLQuery($qry); } I thought about this, too.. But Mark said that he needed to delete from the table where the ID's don't match. If you

Re: order by rand() question

2001-06-15 Thread Chris Petersen
In a slight change of this question (since I have no data to currently test this with, as my ISP is using too old a version of mysql), does anyone know what something like this would do? SELECT * FROM theTable ORDER BY RAND(), date LIMIT 5; I'd like to be able to pull out a certain number of

Re: order by rand() question

2001-06-15 Thread Chris Petersen
In a slight change of this question (since I have no data to currently test this with, as my ISP is using too old a version of mysql), does anyone know what something like this would do? SELECT * FROM theTable ORDER BY RAND(), date LIMIT 5; Exactly the same as SELECT * FROM theTable

Query help!

2001-06-12 Thread Chris Petersen
Can someone tell me why: SELECT Items.*, IF(Items.status IN ('Event', 'Not Purchasable', Special') OR ('-6-12' = Items.start AND '-6-12' Items.end),1,0) as inseason FROM Items, Categories WHERE Items.category=Categories.id AND Items.showitem0 AND Categories.id 5

ORDER weirdness... (help?)

2001-05-31 Thread Chris Petersen
I'm experiencing a little weirdness that I was hoping some one could clear up for me. Take the following query of tab-separated category parents: SELECT parents, name FROM Categories ORDER BY parents, name; In a sample statement, this results in something like: +++ |

MySQL plugin for new FileMaker Pro 5.5?

2001-05-28 Thread Chris Petersen
I was so excited to see that the latest FileMaker Pro finally supports SQL stuff built in, but was disheartened to see that I could only use it with Oracle and a couple other commercial servers. Is anyone out there working on a mysql plugin for 5.5? FileMaker would seemingly be an awesome way

SQL question (timestamps, backups)

2001-05-25 Thread Chris Petersen
Am I posting to the right list? I'm new to this thing. Anyway, I have an interesting, though I think not unusual predicament.. I'm maintaining a number of different tables that contain timestamp fields that keep track of the last time a record was modified. My problem is that if I want to

Re: Memory/CPU usage of various JOIN types?

2001-05-25 Thread Chris Petersen
I've been using LEFT JOIN and NATURAL LEFT JOIN for awhile on queries to medium-sized tables (2500-50,000 items) that aren't TOO large by ane means, but have seemingly been having some issues with this. Can anyone here explain to me the memory usage between doing things like: SELECT

Updating one table off of another?

2001-05-25 Thread Chris Petersen
I know this is a fairly common question, but I thought I'd ask it anyway. I want to do something like: UPDATE tab1 SET tab1.val=tab2.val WHERE tab1.id=tab2.id; Is there any way to do a query like this? Thanks, Chris -

Re: DBI access from CGI script

2001-05-25 Thread Chris Petersen
This is what I have derived from O'Reilly books, though they make the assumption that you are running the script from the same server as the database: $dbh = DBI-connect(dbi:mysql:table1, $host, $user, $password) or die Unable to connect; # table1 is the name of database. I believe it's