Demo CD
As promised WAY too long ago, the techniques and tools to create an Apache / PHP / MySQL Demo CD are now available. I've made them available for download, with some documentation, on http://www.broadowlersystems.co.uk/democd - please feel free to download and play. Requires Spoon Installer (included in download), Apache / Mysql / PHP / Visual Basic 6 (blech). Rules / Licence : No cost, no obligation, no warranty, no guarantee of fitness, usability or support. Do what you will with it. Shower me with praise at [EMAIL PROTECTED] Criticisms to /dev/null. :o) David Shields -- Never do today what you can put off until tomorrow. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Replication Question
The MySQL manual for 3.23.38, Section 11.4 states that you can have a replication chain A -> B -> C -> A. I guess this means A Master B Slave B Master C Slave C Master A Slave Can this loop be reduced to the most trivial case A -> B -> A ? If so, it would help me with a roving laptop issue I have. Naturally I accept there are contraints (creating dup key items on A and B while laptop disconnected etc), but is it doable ? David. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
HOWTO: diffs between rows.
Probably a very simple one for you guys, but I'm stuck. Given a simple table (events): id int st time not null et time not null I know I can get duration by converting st and et to secs and subtracting (that bits easy), but how would I go about getting the gap between successive records IN MY SQL STATEMENT (without processing the result set in my application language (php)): i.e. id st et 1 09:00 10:00 2 10:15 10:45 3 11:45 12:00 ... i.e. my result wants to be (assuming data is good, and sort by st) id st et gap_since_last_row 1 09:00 10:00 0 (no prev row) 2 10:15 10:45 0:15 3 11:45 12:00 1:00 ... I suspect I should be using SQL variables, but docs seem a bit opaque. Anyone point me in right direction ? David. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Help with Join
It's late, and I'm being dumb, so can anyone help ? I know that select customer.custcode, bookings.cust from customer left join bookings on customer.custcode=bookings.cust where bookings.cust is null; will show me all customers with no corresponding entry in bookings table. But I want to know those customers with no bookings in last few weeks : I thought maybe select customer.custcode, bookings.cust from customer left join bookings on customer.custcode=bookings.cust where bookings.stdt > '2002-02-16' and bookings.cust is null but that aint right. Help ? Please ? David bot-bait sql, query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Implementation Design Help Required
I've asked this before, but let me describe it another way, and see if anyone has any bright ideas: My client has 3 offices. Each office needs to use same app (over MySQL). Each office needs (effectively) same database. Updates done at each office need to be used at other offices. Updates visibility not too time critical - overnight re-synch is acceptable. Ideal Solution: One central database, all clients at each office connect to it. BUT - geographically separate, telecomms costs prohibit live on-line access at reasonable speed to same database. Should I : a) Use a copy of database at each office. Log each update at each office, and apply these at night to other 2 databases. b) Use replication with link down until night-time, when replication method will do re synch for me. c) Some better solution you wonderful people out there are going to suggest to me, and I will say "Do, why didn't I think of that !" a) looks clumsy b) Don't know if replication model is appropriate. TIA David. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
(Sort of ) replication issue
You wrote: What about mysqldump? See http://www.mysql.com/doc/m/y/mysqldump.html for more info about mysqldump. well, no, not really : site1 - has apache / php / mysql + database x site2 - has apache / php / mysql + database y site3 - has apache / php / mysql + database z at 9:00 am all databses (x,y,z) are same. during day, people at 1 update x, people at 2 update y, people at 3 update z. at (say) 23:00 , I want to put all x's changes into y and z, all y's changes into x and z, all z's changes into x and y. mysqldump x > x.dmp mysqldump y > y.dmp mysqldump z > z.dmp would require that i then do a diff of x, y and apply all < diffs to x, all > diffs to y ... and so on - it looks like an over-engineered solution to me. What I was asking is whether replication would ease my pain. David. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
(Sort of ) replication issue
Hi, I was wondering if any of you clever people out there can help me. I have a client with a problem I'm sure some of you have fixed in the past ... Client has 3 geographically separate sites, running same application (mine, of course) and generating data on MySQL database. Periodically (probably nightly), we want to push changes occurring on each database into each of other 2 sites. Data volumes are low-ish (est max 5Meg per database absolute worst case). Line cost is minimal (ADSL), and comms issues I can work out just fine. This strikes me as a version of the multi-mysql-database replication pattern, though sort of slow. Is replication setup acceptable, or are the downtimes where databases are separate an issue, and is this using a sledgehammer to crack a nut? The alternative that occurs to me (though it is a bit if a pain) is to change my code slightly so each DB update query is written to a transaction log at each site, and then manually apply each of these logs to the other 2 databases. I can do this fine, but it seems a bit, well, crude. Plus the overhead of protecting the logs, and of clearing them on successful completion. Am I missing something, or is there a better way ? Advice and recommendations solicited and welcomed. David. (By the way, Mysql 3.23.38, app in php 4.0.5) Magic words: sql, database, query, abracadabra, butterscotch, nibble, phong. (some of these are just *nice* words, you know ? ) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL Checkbox table field
Alright then! > database,sql,query,table Which field type do I use for a simply checkbox Y,N? Thanks Any objection to this ? cbcolumn enum ('Y', 'N') NOT NULL DEFAULT 'Y' May not be the most space efficient, but its clear, self-documented and unambiguous. It does what it says on the tin. David. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Security Update ?
A few weeks ago there was a flurry of postings re a security hole in MySQL (including flames about whether or not the message should have been posted, but that's a different issue. Are there any status updates regarding this problem ? Fixed / Gone away / never there in first place ? Info would be appreciated. David. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: need help on "replication"
Joe: AFAIR, as an ex NT4 sysadmin, system error 5 is access denied - you have a permissions problem somewhere. On NT4 these can be a swine to solve. Check out your NT system error logs as a starting point. HTH. David >By the way, I once first tried to set up the slave on a NT machine. But for >"unknown" (means I donot know) reasons, I can not even "net start mysql" on >that machine now. The error message is "system error 5". Did you meet this >problem? If so, how did you solve it? >thanks alot, >Joe - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php