Jeff,
I would use a join table, teacher_flights.
create table teacher_flights(
teacher_id int(11) not null,
flight_id int(11) not null,
primary key(teacher_id, flight_id));
Dave
From: Mark Phillips m...@phillipsmarketing.biz
To: Mysql List
select 'U02714','U02718';
insert into my_table values('U02714');
insert into my_table values('U02718');
Let me know if this is what you intended.
Dave
From: h...@tbbs.net h...@tbbs.net
To: mysql@lists.mysql.com
Sent: Friday, March 23, 2012 5:14 PM
- Original Message
From: Robert DiFalco [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Thursday, March 9, 2006 9:32:44 AM
Subject: InnoDB Indices
I have some questions regarding InnoDB indices.
Say I have a table with millions of records. On of the fields is a type
field that has
. There are exceptions to this
rule.
If you could send a sample of table1, table2, and the
result set you want to arrive at I'd appreciate it.
Dave
--- mos [EMAIL PROTECTED] wrote:
At 09:54 PM 11/8/2005, David Turner wrote:
If you could present sample data of both table1,
table2, and an example
If you could present sample data of both table1,
table2, and an example of the result set it would be
easier to give you the sql. I believe you could
eliminate the temporary table with a subselect in the
original query. The subselect is where you would
specify 'Smith'.
Dave
--- mos [EMAIL
select first_name, lastname from user where
first_name like '%$user%'
or
last_name like '%$user%'
;
--- Matt Babineau [EMAIL PROTECTED] wrote:
Hey All-
Got a fun question - I hit the manual but not much
luck on my question. I
want to combine 2 fields and then search them
SELECT
, no?
-Dave
-Original Message-
From: David Turner [mailto:[EMAIL PROTECTED]
Sent: October 1, 2004 4:04 PM
To: [EMAIL PROTECTED]
Subject: Indexing for OR clauses
Wondering if anyone can give me advice on indexing for OR clauses.
I have a table with a number of fields, two of which are sender_id
Wondering if anyone can give me advice on indexing for OR clauses.
I have a table with a number of fields, two of which are sender_id and
receiver_id. I also have a query such as this:
SELECT ...
WHERE (sender_id = 98765 OR reciever_id = 98765)
The query is OK for a limit of 10, but if I
Has anyone architected an oltp database using mysql where downtime is
virtually eliminated? I understand it's fairly simple to set up a readonly system
using mysql replication or another type of replication to maintain the
uptime, but I have yet to see how to do this with a heavy transaction
The thing is I'm looking for a solution with guaranteed transaction success. I have
thought about building a layer that would guarantee transaction success. Say I had
two duplicate databases and if a transaction failed on one it would still succeed
on the other. Once the transaction failed it
Are there any steps I need to take to ensure no corruption of the database if
I downgrade from say
3.23.49
to
3.23.48
Thanks, Dave
query,sql
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
I guess
make install prefix=/home/turner/mysql/test
just isn't an option. How would I request this functionality be provided
in the make file?
Thanks, Dave Turner
On Tue, Apr 09, 2002 at 05:45:04PM -0700, David Turner wrote:
Thanks, but what I need to do is have
make install install
=/home/turner/mysql/test
Thanks, Dave
On Tue, Apr 09, 2002 at 05:41:08PM -0700, Jeremy Zawodny wrote:
On Tue, Apr 09, 2002 at 05:30:06PM -0700, David Turner wrote:
I would like to make install to my home directory but can't seem to get it to
work.
make install prefix=/home/turner/mysql
Check out cygwin.com. I think it's free. Great for unix guys having to
run on NT.
Dave
On Tue, Apr 02, 2002 at 05:25:15PM -0600, Russell E Glaue wrote:
On Tue, 2 Apr 2002, Mark Stringham wrote:
What would the script look like if I'm on Win2k ?
Good luck!!
But seriously; there is a
Does anyone have a script to check on the replication status of the slave to make
sure it isn't falling too far behind?
Thanks, Dave Turner
sql
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
Is this a true export? Because I've never had garbage lines in my files.
Dave
On Mon, Mar 04, 2002 at 10:33:14AM -0600, Paul DuBois wrote:
At 10:58 -0500 3/4/02, Richard Bolen wrote:
I'm exporting data from Oracle and importing it into MySQL. The
problem is Oracle puts garbage lines at the
If you do that don't you run a greater risk of corruption of the datafiles
if the host unexpectedly goes down?
Dave
On Mon, Feb 25, 2002 at 01:07:06PM -0800, Steven Roussey wrote:
I was reading an article on speeding up Oracle on Linux(1) and thought
their two optimizations for Linux would
rebuilt. 2 disk SCSI RAID 0 is not enough.
4 disk SCSI RAID 0 or 4 disk SCSI 0+1 is much better.
Sincerely,
Steven Roussey
http://Network54.com/?pp=e
-Original Message-
From: David Turner [mailto:[EMAIL PROTECTED]]
If you do that don't you run a greater risk of corruption
On Sat, Feb 23, 2002 at 12:39:43AM +0100, [EMAIL PROTECTED] wrote:
Your message cannot be posted because it appears to be either spam or
simply off topic to our filter. To bypass the filter you must include
one of the following words in your message:
sql,query
If you just reply to this
select id from table_name order by abs(id);
Dave
Dundee!
On Tue, Feb 12, 2002 at 09:46:25AM +1000, David Mackay wrote:
G'Day folks,
New to PHP/MySQL.
Want to order the results of a SELECT by their 'absolute' value, not their
sign.
So regardless of whether it's +37 or -37, they
Paste your sql exactly as it is and your version of mysql.
Dave
On Tue, Feb 12, 2002 at 10:08:10AM +1000, David Mackay wrote:
Thanks for your quick response Dave,
Have tried this, but no bannana...
I get:
You have an error in your SQL syntax near 'abs(id)' at line 1
Seems a not-valid
MAX_EXTENSION=
select a.id + 1 from dude a left join dude b on a.id +1 = b.id where b.id is null and
a.id MAX_EXTENSION;
You'll have to have one record in the table for this to work. I've done a better job
of this
in Oracle because of nested queries, but I think this could give you a
How do I get a file full of sql commands to run
from the mysql prompt?
In oracle I would type
@thefilename
I know how to do run the file from the unix prompt mysql thefilename.sql
Thanks, Dave
-
Before posting, please
Cool, thx.
Dave
On Fri, Feb 01, 2002 at 01:21:18PM -0600, Paul DuBois wrote:
At 11:12 -0800 2/1/02, David Turner wrote:
How do I get a file full of sql commands to run
from the mysql prompt?
mysql source filename;
or
mysql \. filename;
In oracle I would type
Sorry not real familar with MYSQL syntax yet but I think you'll
be able to translate.
select
m.magazinename
from
s,m,b
where
s.name = 'fred'
and
s.id=b.subscriberid
and
m.id=b.magazineid
;
On Wed, Jan 23, 2002 at 03:59:11PM -0700, Christopher Thompson wrote:
At 02:51 PM
Another suggestion I saw someone make that seems reasonable is to use a
break away mirror for backups. I think they lock the tables for a minute
break the mirror and unlock the tables. Then they backup the broken mirror
at their leisure.
Dave
On Tue, Dec 18, 2001 at 06:00:49PM -0500, Dave Greco
Try sequences.
Dave
On Thu, Dec 13, 2001 at 06:18:32PM -, Matthew Smith wrote:
the SELECT LAST_INSERT_ID() gets the last autoincremented number for the
current connection.
See http://www.mysql.com/doc/G/e/Getting_unique_ID.html
The auto_incremenet field is sadly lacking in Oracle
Just tell your boss that if you ever have turnover the former employee
will be able to log into all the customers' accounts and do whatever he
wants.
Dave
On Thu, Dec 13, 2001 at 03:29:41AM +1100, Duncan Maitland wrote:
My questions concern a setup where a public server is running at our
I've always thought it would be great if there was a way to drop an object but
keep the meta data so I can recreate objects without having to store the ddl
somewhere.
alter table drop index retain metadata
Would be helpful.
Dave
On Tue, Dec 04, 2001 at 11:19:43AM -0500, Robert Alexander
Thanks, but I'm looking at having this for all objects
drop table mytable retain metadata;
etc
Dave
On Tue, Dec 04, 2001 at 06:52:17PM +0100, Sergei Golubchik wrote:
Hi!
On Dec 04, David Turner wrote:
I've always thought it would be great if there was a way to drop an object but
keep
BTW, this is unique in MySQL - you can have tables mixed to be
transactional (InnoDB) and nontransactional (MyISAM) and use them mixed
in same query. All other SQL-s (as much I know) have transactions on
Oracle's Global Temporary Tables don't write to redo or rollback, and
on normal tables
No problem, MYSQL is great and I know far less about it than I do
Oracle.
Dave
On Fri, Oct 05, 2001 at 06:08:07PM +0200, Tonu Samuel wrote:
On Fri, 2001-10-05 at 17:06, David Turner wrote:
BTW, this is unique in MySQL - you can have tables mixed to be
transactional (InnoDB
If this is the case. What are the steps necessary for index rebuilds? Can
I specify where the index file is rebuilt? Any idea when we can specify
the location of datafiles and indexfiles?
Thanks, Dave
On Wed, Oct 03, 2001 at 07:57:35AM -0700, Adams, Bill TQO wrote:
Perhaps your index file
I've had the same issues. I have really avoided the dev side of things
for some time so I'm not sure whether there's a way around it. Mainly
just devoting myself to administration. Funny though I'm starting to
write jsp stuff to monitor the databases more effectively.
I agree with you on the
On Mon, Sep 24, 2001 at 03:02:42PM -0700, Venu wrote:
Hi
Another small research in Access made me to see the changed table structure
completely. Please use this procedure to view or to refresh links when the
structure or location of a linked table has changed.
1. Open the database
What I did to handle global changes was have one access file on the
fileserver that everyone had a shortcut to. That way the updates
were global since they were all to the same file.
Dave
On Mon, Sep 24, 2001 at 04:19:55PM -0600, Adam Douglas wrote:
Another small research in Access made me to
Does anyone have a good configure statement I could try for making
MYSQL on Solaris for Sparc? I've got it compiling on X86 but I get a
parser error I've only seen mention of once on the lists, and I
did not see how to identify the reserved word I am using?
I'll continue digging around, but if
A friend of mine mentioned something about perl stored procedures for
MYSQL. Has anyone heard about this? I have searched everywhere and only
seen posts related to POSTGRESQL. If they have this for MYSQL it would
be really helpful.
Thanks, Dave
On Mon, Sep 03, 2001 at 01:37:23AM -0700, Jeremy
Great thanks, I'll check it out.
Dave
On Mon, Sep 03, 2001 at 01:49:31PM -0700, Steve Edberg wrote:
At 1:10 PM -0700 9/3/01, David Turner wrote:
A friend of mine mentioned something about perl stored procedures for
MYSQL. Has anyone heard about this? I have searched everywhere and only
seen
Can you explain this further?
Dave
On Sat, Sep 01, 2001 at 12:52:43PM +0400, Ilya Martynov wrote:
AM I'm porting an application to MySQL and I need to support transactions.
AM I will appreciate so much if someone could give me some impressions about
AM which one is better. BerkeleyDB or
This is one thing I really can't stand about mysql. We should have the option when
creating
databases and tables of specifying where the database is located and the datafile and
indexfile.
Dave
On Fri, Aug 31, 2001 at 07:03:40PM +0200, Simon J Mudd wrote:
On Fri, 31 Aug 2001, Peter Moscatt
for everyone's help. I now have a working backup script.
-Original Message-
From: David Turner [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 29, 2001 1:00 PM
To: Joshua J. Kugler
Cc: David Turner; Matthew Walker; MySQL Mailling List
Subject: Re: Hot Backups
Didn't read your
He may mean a composite primary key, which is a primary key based on two columns. On
whether this is a good idea or not it's really a question of whether you want to use
natural or surrogate keys on your tables.
A composite key is typically a natural key. A natural key is a key with
The way I am planning on doing it is setting up another server that I replicated to
and backing that server up. I would like to hear how other people are backing up
servers
without interupting service.
Dave
On Wed, Aug 29, 2001 at 12:50:06PM -0600, Matthew Walker wrote:
What's the best way of
a table before it dumps, so there won't be any
funny records. Or course, mysqldump could catch the database in the middle
of a multi-table backup. But so can any live backup system.
j- k-
On Wednesday 29 August 2001 10:52, David Turner wrote:
The way I am planning on doing
in the middle
of a multi-table backup. But so can any live backup system.
j- k-
On Wednesday 29 August 2001 10:52, David Turner wrote:
The way I am planning on doing it is setting up another server that I
replicated to and backing that server up. I would like to hear how other
Besides that theoretical stuff, though, the real problem is that
INSERT is for inserting new records into a database table. What
you're trying to do is UPDATE existing records with new data. And
there's no INSERT ... SELECT counterpart in the UPDATE syntax.
What about replace?
replace
Yes, that's probably where we'll end up.
Thanks, Dave
On Tue, Aug 21, 2001 at 03:28:51PM -0700, Jeremy Zawodny wrote:
On Mon, Aug 20, 2001 at 01:21:22PM -0700, David Turner wrote:
It looks like this will only run on Linux and I must either use
Sparc Solaris or X86. I hate to implement
You would think this would get built into MYSQL though.
Dave
On Tue, Aug 21, 2001 at 03:28:51PM -0700, Jeremy Zawodny wrote:
On Mon, Aug 20, 2001 at 01:21:22PM -0700, David Turner wrote:
It looks like this will only run on Linux and I must either use
Sparc Solaris or X86. I hate
I have two identical primarily readonly databases that I want to be able to
upgrade on the fly. What I want to be able to do is take one down and
have all my connections redirected to the second database automatically. I
would also like the same auto failover when a database crashes, because of
Great, thanks, Dave
On Mon, Aug 20, 2001 at 01:04:10PM -0700, Jeremy Zawodny wrote:
On Mon, Aug 20, 2001 at 09:28:20AM -0700, David Turner wrote:
I have two identical primarily readonly databases that I want to be
able to upgrade on the fly. What I want to be able to do is take one
down
It looks like this will only run on Linux and I must either use Sparc Solaris
or X86. I hate to implement the failover within the application.
Thanks anyway, Dave
On Mon, Aug 20, 2001 at 01:04:10PM -0700, Jeremy Zawodny wrote:
On Mon, Aug 20, 2001 at 09:28:20AM -0700, David Turner wrote
Try this. I couldn't find if MYSQL supports not in's so I followed there
outer joins. You can read up on in in the mysql manual, do a search on
outer joins.
select base.zipcode,properties.zipcode from base right join properties on
base.zipcode=properties.zipcode where base.zipcode is null;
On
No offense but I've seen people on the list throwing replication around like
MySQL has replication end of story. There's alot more to replication than just
a master and a slave. What MySQL has is simple unidirectional replication. If
you want advanced or bidirectional replication you'll have to
54 matches
Mail list logo