Scott, how about the use of a MERGE table?
create a merge table 'orders' with 'orders_npfd' and 'orders_npfs'
underneath it.
http://dev.mysql.com/doc/refman/5.0/en/merge-storage-engine.html
Dan
On 8/2/06, Scott Haneda <[EMAIL PROTECTED]> wrote:
Forgive the mess I present you, this is a strang
Forgive the mess I present you, this is a strangely done site with a even
stranger structure and methodology that I am trying to work with.
The basic idea is one website has multiple websites in it. So if you place
an order with website A, orders_A is where the data is stored, if you place
an ord
Chris,
>select count(distinct uid) as c
>from aptg_guides_restricted as r, aptg_guides as g
..
See the extensive notes on comma and SQL2003 joins at
http://dev.mysql.com/doc/refman/5.1/en/join.html.
Lose the comma join, make it a SQL2003 (explicit inner) join.
PB
-
At 15:56 +0200 25
At 11:10 -0500 25/4/06, gerald_clark wrote:
Yes. 3.23 was not correct in the order of precedence.
This has been answered many times here.
Sorry - I haven't been on the list all that long.
You need to change your comma join to an inner join.
Lovely! That's it - many thanks.
At 17:15 +0100 2
2006/4/25, Chris Sansom <[EMAIL PROTECTED]>:
> At 15:56 +0200 25/4/06, Barry wrote:
> >And you don't see any misdone queries when you echo them, right?
> >Hope you checked that.
>
> Hi Barry
>
> I was wrong about its being a PHP issue: it's
> definitely a MySQL error. I realised I hadn't
> handled
Chris Sansom wrote:
At 15:56 +0200 25/4/06, Barry wrote:
And you don't see any misdone queries when you echo them, right?
Hope you checked that.
Hi Barry
I was wrong about its being a PHP issue: it's definitely a MySQL
error. I realised I hadn't handled the error in such a way that I
cou
At 15:56 +0200 25/4/06, Barry wrote:
And you don't see any misdone queries when you echo them, right?
Hope you checked that.
Hi Barry
I was wrong about its being a PHP issue: it's
definitely a MySQL error. I realised I hadn't
handled the error in such a way that I could see
what it was, but
At 15:56 +0200 25/4/06, Barry wrote:
Updating is always such a bad idea ;P
Do you know: never touch a running system? ^_^
Hmmm...
And you don't see any misdone queries when you echo them, right?
Hope you checked that.
Yes, they look just fine - in any case they're unchanged from when it
wa
Chris Sansom schrieb:
As a relative newbie, and an almost total newbie to the use of left
joins, I'm aware that there's some difference in the way joins work
between MySQL 3.x and 5.x, but in my ignorance I can't figure out what
the heck it is from reading the 'upgrading' pages on dev.mysql.com
As a relative newbie, and an almost total newbie to the use of left
joins, I'm aware that there's some difference in the way joins work
between MySQL 3.x and 5.x, but in my ignorance I can't figure out
what the heck it is from reading the 'upgrading' pages on
dev.mysql.com.
When I first joine
hese need to be correct for your setup or mysql will reject the connection
HTH
Steve
kloomis wrote:
Hello:
After an all nighter, and reading and trying as much as I can, I'm
completely stumped.
I'm running RedHat 9, Apache 2.0, SSL, mySQL 3.23, PHP-4.2.2
I can create and insert tables o
llo:
>
> After an all nighter, and reading and trying as much as I can, I'm
> completely stumped.
>
> I'm running RedHat 9, Apache 2.0, SSL, mySQL 3.23, PHP-4.2.2
>
> I can create and insert tables on the server command line.
> I can run php coded pages residing on
Hello:
After an all nighter, and reading and trying as much as I can, I'm
completely stumped.
I'm running RedHat 9, Apache 2.0, SSL, mySQL 3.23, PHP-4.2.2
I can create and insert tables on the server command line.
I can run php coded pages residing on the server from a remote browser.
Asplund [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 20, 2004 1:26 PM
To: Chris Boget
Cc: [EMAIL PROTECTED]; MySQL
Subject: Re: Stumped on a query
On Tue, 20 Jan 2004, Chris Boget wrote:
> > > The data I'm working with looks like this:
> > > table1.columnA = '1;3;4
On Tue, 20 Jan 2004, Chris Boget wrote:
> > > The data I'm working with looks like this:
> > > table1.columnA = '1;3;4;6;8;9;12;13;14;15';
> > > table2.columnA = '3';
> > > table2.columnB = 'this';
> > > I need to write a query that will do something along these lines:
> > > SELECT * FROM table1,
On Tue, Jan 20, 2004 at 03:02:45PM -0600, Chris Boget wrote:
> > > The data I'm working with looks like this:
> > > table1.columnA = '1;3;4;6;8;9;12;13;14;15';
> > > table2.columnA = '3';
> > > table2.columnB = 'this';
> > > I need to write a query that will do something along these lines:
> > > SE
> > The data I'm working with looks like this:
> > table1.columnA = '1;3;4;6;8;9;12;13;14;15';
> > table2.columnA = '3';
> > table2.columnB = 'this';
> > I need to write a query that will do something along these lines:
> > SELECT * FROM table1, table2 WHERE
> > table2.columnB = 'this'
> > AND
>
On Tue, 20 Jan 2004, Chris Boget wrote:
> The data I'm working with looks like this:
>
> table1.columnA = '1;3;4;6;8;9;12;13;14;15';
>
> table2.columnA = '3';
> table2.columnB = 'this';
>
> I need to write a query that will do something along these lines:
>
> SELECT * FROM table1, table2 WHERE
>
I'm working with data that has not been normalized. If it were
up to me and I had the time, I'd go in and change all the code
so that the data were normalized, but right now that's not an
option.
The data I'm working with looks like this:
table1.columnA = '1;3;4;6;8;9;12;13;14;15';
table2.colum
Patrick,
You need "outer joins" to do this. Try searching for "outer join sql
tutorial" on Google.
Hope this helps,
Andy
> -Original Message-
> From: Patrick Crowley [mailto:[EMAIL PROTECTED]
> Sent: 07 August 2003 16:51
> To: [EMAIL PROTECTED]
&g
> Sounds as if your table is not normalized for that kind of query. If
> there are multiple directors id'd by multiple movies you could left
> outer join the movie.id with the director.id
>
> Make sense?
Actually, it's normalized beyond that.
Sometimes, movies have more than one director, so th
[snip]
Thanks, Jay and Andy! OUTER JOINS work great for part of my query.
But how would you modify this query to support multiple directors?
(That's
why I've got a movie_director table.)
Movie Name | Director A, Director B, etc. | 35 comments
Best,
Patrick
> SELECT foo
> FROM movie LEFT OU
I'm creating a tool to browse a database of movie listings. The browser
pulls up 25 results at a time, and you can page through them using 'Next'
and 'Prev' tools. Pretty basic stuff.
Here are my tables:
movies
directors
comments
movies_directors
movies_comments
etc...
Thanks, Jay and Andy! OUTER JOINS work great for part of my query.
But how would you modify this query to support multiple directors? (That's
why I've got a movie_director table.)
Movie Name | Director A, Director B, etc. | 35 comments
Best,
Patrick
> SELECT foo
> FROM movie LEFT OUTER JOI
> Sometimes, movies have more than one director, so the
> association between movies and directors needs to be in its
> own table, instead of the movies table. (Otherwise, you're
> limited to some fixed number of directors per
> film.)
>
> Directors may not be the best example. Think about prod
The comma after Gerlad R was a typo.
As for the 500 actors issue, I'm merely using the movie db as an example.
People always post the strangest db's to this list ("I have one table for
monkeys and one for fishes who speak Urdu, and I need..."), so I thought I'd
spare everyone the particulars of mi
[snip]
But here's where I'm stuck: for each film, I need to pull the movie info
in
'movies', plus any related data from other tables, like this:
The Lord of the Rings | Peter Jackson | 3 comments
Episode II| George Lucas | 0 comments
Indiana Jones | Steven
> I am changing a database and changing the user and password of an
> existing
> database. when I enter the line.
>
> mysql> insert into user (host, user, password) values ('localhost',
> 'newuser', password ('newpswrd'));
>
> the error 1062: Duplicate entry 'localhost-newuser' for key 1
> mysql>
I'm new to mysql but not databases or programming. I followed Julie
Meloni's PHP fast &easy to learn the basics. However, now that I am going
back through the material and trying to make changes, problems are rising
that I can't solve.
I am changing a database and changing the user and passwor
I'm new to mysql but not databases or programming. I followed Julie
Meloni's PHP fast &easy to learn the basics. However, now that I am going
back through the material and trying to make changes, problems are rising
that I can't solve.
I am changing a database and changing the user and passwor
On Sunday, April 6, 2003, at 10:28 AM, B. van Ouwerkerk wrote:
You don't explain your problem.
First problem is that after doing a clean install of
mysql-standard-4.0.12 and following the instructions
cd /usr/local/mysql
sudo ./bin/mysqld_safe
(Enter your password)
(Press CTRL+Z)
bg
ars for the commercial license at the moment and
can't stomach paying that much just to learn how to get MySQL running and
be able to create new tables.
I've been a Macintosh C programmer for 7 years and after that, being
unable to get a database running after following the instructions to
after following the instructions to
the letter has me rather stumped. Any Unix/MySQL experts willing to
spend a 15 minutes or so on AIM to help me out?
Thanks
Ken Tozier
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Well, I'm on the verge of giving up on connecting to the MySQL server
externally. I've updated the Host fields in the User and Db tables to
be %, but I still get error 1130 when I connect, and the user name
isn't transmitted.
The manager of the database (it isn't mine) claims PHPmyAdmin (which
Dear All,
I am stumped on this report.
I just need an idea and help to do this in MySQL.
To simplify my actual database, I am using an example.
Database fields - salesperson,date,visited company industry type
salespersons - a,b,c,d,e (can be 10 salesperson or 20 salesperson)
visited company
il address : [EMAIL PROTECTED]
[EMAIL PROTECTED]
- Original Message -
From: Ian Phillips <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 26, 2002 11:27 AM
Subject: Stumped
> Dear Group members
>
> Well I'm a bi
On Fri, 26 Apr 2002 18:27:24 +1000
"Ian Phillips" <[EMAIL PROTECTED]> wrote:
>
> Thanks to Gelu for his patience: unfortunately his suggestion of
> Gelu> Go to /etc/init.d and type : ./mysql(d) restart
> didn't work for me, as I do not have init.d in /etc - I have searched for
> ti, but not ther
Dear Group members
Well I'm a bit stumped
I've gone around a few times trying to get mysql working again on my server.
Here is a current list of processes running - and it seems that mysqld is
running (twice) - bother are idle (I). Is it safe to send a kill command to
these proce
ook publisher's web
>site and there were no corrections for this page. This makes me even more
>stumped...
>
>Here's the statement I submitted:
>
>CREATE TABLE member
>(
>last_name VARCHAR(20) NOT NULL,
>last_name VARCHAR(20) NOT NULL,
>suffix VARCHAR(5) NUL
(EDT)
> To: Jeff Caron <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Subject: Re: Newbie stumped by table error
>
>
> Also, I don' think "-00-00" is a valid Date. You might want to use
> something else as a default.
>
> - TIM
>
>
TED]>
> Subject: Re: Newbie stumped by table error
>
>
> Did you try taking out one of the 'last_name' field definitions?? It
> looks like you have two there...
>
> - TIM
>
>> Hello-
>>
>> I'm just beginning to teach myself MySQL with
w and love.
--
Barry C. Hawkins
Systems Consultant, MCSE 4.0
[EMAIL PROTECTED]
-Original Message-
From: Jeff Caron [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 13, 2001 12:49 PM
To: Barry C. Hawkins; [EMAIL PROTECTED]
Subject: Re: Newbie stumped by table error
Thanks, Barry!
I en
y create this table?
>
> Incidentally, I checked the corrections document on the book publisher's web
> site and there were no corrections for this page. This makes me even more
> stumped...
>
> Here's the statement I submitted:
>
> CREATE TABLE member
> (
>
rectly create this table?
>
> Incidentally, I checked the corrections document on the book publisher's web
> site and there were no corrections for this page. This makes me even more
> stumped...
>
> Here's the statement I submitted:
>
> CREATE TABLE member
> (
>
Jeff
> From: "Barry C. Hawkins" <[EMAIL PROTECTED]>
> Date: Wed, 13 Jun 2001 12:28:30 -0400
> To: Jeff Caron <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
> Subject: Re: Newbie stumped by table error
>
> on 6/13/01 10:58, Jeff Caron at [EMAIL PROTECTED] wro
ctions document on the book publisher's web
> site and there were no corrections for this page. This makes me even more
> stumped...
>
> Here's the statement I submitted:
>
> CREATE TABLE member
> (
> last_name VARCHAR(20) NOT NULL,
> last_name VARCHAR(20) NOT
(20),
-> species VARCHAR(20), sex CHAR(1), birth DATE, death DATE);
-Original Message-
FROM: Jeff Caron
TO: [EMAIL PROTECTED]
DATE: Wed 6/13/01 10:15
SUBJECT: Newbie stumped by table error
Hello-
I'm just beginning to teach myself MySQL with the help of Michael Widenius'
bo
#x27;t go any further with the tutorial
without creating all the tables first. Could someone on this list please
help me so I can correctly create this table?
Incidentally, I checked the corrections document on the book publisher's web
site and there were no corrections for this page. This ma
Hello All,
MySQL version 3.23.33
I was hoping someone maybe able to offer some suggestion on a search query I've
been working for a day or so, but seems to be getting no where fast!
I've attached the tables and test inserts I'm working with. This is for a
business referral search where people s
Hello All,
MySQL version 3.23.33
I was hoping someone maybe able to offer some suggestion on a search query I've
been working for a day or so, but seems to be getting no where fast!
I've attached the tables and test inserts I'm working with. This is for a
business referral search where people s
#
# Table structure for table 'bus_info'
#
CREATE TABLE bus_info (
info_id int(11) unsigned DEFAULT '' NOT NULL auto_increment,
bus_name varchar(100) DEFAULT '' NOT NULL ,
contact_fname varchar(20) DEFAULT '' NOT NULL ,
contact_lname varchar(20) DEFAULT '' NOT NULL ,
refer_by int(8))
Many thanks. Problem is cured
- Original Message -
From: "Thalis A. Kalfigopoulos" <[EMAIL PROTECTED]>
To: "Cory Whitesell" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, February 24, 2001 4:26 PM
Subject: Re: Stumped
> > Thi
> This should be very simple, but for some reason, my query does not return the
>desired results
> I have the following two tables:
>
> CREATE TABLE Rank (
> Rank CHAR(40) NOT NULL PRIMARY KEY,
> ReportsTo CHAR(40) NULL
> );
>
> CREATE TABLE ROSTER (
> EntryNumber INTEGER NOT NULL AUTO_
al Message -
From: "WCBaker" <[EMAIL PROTECTED]>
To: "MySQL" <[EMAIL PROTECTED]>
Sent: Saturday, February 24, 2001 5:02 PM
Subject: silly question but I'm stumped
> Hi All!
>
> I have a need to make a LONG insert command. Does anyone have an
Hi All!
I have a need to make a LONG insert command. Does anyone have an example
of something like this:
$result1=MYSQL_QUERY("INSERT INTO test(dataA,dataB) VALUES
('$dataA','$dataB')");
but SPREAD over more than one line?I can't seem to get the quotes and
backslashes right for some unknow
This should be very simple, but for some reason, my query does not return the desired
results
I have the following two tables:
CREATE TABLE Rank (
Rank CHAR(40) NOT NULL PRIMARY KEY,
ReportsTo CHAR(40) NULL
);
CREATE TABLE ROSTER (
EntryNumber INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY
Thanks That worked
-
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-m
Put your limit at the end
On 17 Jan 2001 11:26:04 +1100, MacBane wrote:
> The variables are set using php and are all set correctly.
> how do I do the where and order by statement
>
> SELECT * FROM $table_name LIMIT $indst,$inded where sec_id = $sec order by PG_date
>DESC
>
>
The variables are set using php and are all set correctly.
how do I do the where and order by statement
SELECT * FROM $table_name LIMIT $indst,$inded where sec_id = $sec order by PG_date
DESC
[EMAIL PROTECTED] writes:
> Hey there, I've written about this a few times now and haven't received very many
>ideas.
>
> I'm running a pentium based server with 256 megs of ram using BSDI O/S 4.1
>
> I currently have the latest build of Perl 5 on my system as well.
>
> When I do a mak
[EMAIL PROTECTED] wrote:
>
> Hey there, I've written about this a few times now and haven't received very many
>ideas.
>
> I'm running a pentium based server with 256 megs of ram using BSDI O/S 4.1
>
> I currently have the latest build of Perl 5 on my system as well.
>
> When I do a make on A
Hey there, I've written about this a few times now and haven't received very many
ideas.
I'm running a pentium based server with 256 megs of ram using BSDI O/S 4.1
I currently have the latest build of Perl 5 on my system as well.
When I do a make on ANY version of MySQL 3.23.x, it always stops
62 matches
Mail list logo