Sounds like you want to do an inner(?) join on the two tables. This will show
you where you have matches between the two tables but also show you the items
that don't match (no special instructions). If I understand right, you have an
"order_id" in both "orders" and "special_orders_instruction
ge]
> From: Dennis Seavers <[EMAIL PROTECTED]>
> To: Robert Sossomon <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Date: 06/04/2004 12:00:39 AM
> Subject: Re: [PHP] select from db
>
> When you run this script, or one like it, does it work? You seem to
; From: Robert Sossomon <[EMAIL PROTECTED]>
> To: BigMark <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Date: 06/03/2004 11:44:58 PM
> Subject: Re: [PHP] select from db
>
>
> > table name 'Selections'
> >
> > (rows)
> table name 'Selections'
>
> (rows) RoundGameName Winner Points
> data eg 1 1mark Hawthorn 4
> (if team is a winner then 4 points added)
>
>1 2mark Geelong 0
>
Assuming y
* Thus wrote Travis Low ([EMAIL PROTECTED]):
> Hi Michal,
>
> Getting back to the original posting, I'm basically saying that I don't
> think it's a good idea to structure or restructure a database for the sake
> of simplifying a few SQL statements. Especially if the data being joined
> is in
Hi Michal,
Getting back to the original posting, I'm basically saying that I don't think
it's a good idea to structure or restructure a database for the sake of
simplifying a few SQL statements. Especially if the data being joined is in
separate tables for a good reason.
Regarding optimizing
> Up what creek? You didn't really provide any technical justification
> for your suggestion.
Up the creek of having to call for help on php-general because you have 24
identical tables you need to join, having never performed a join before.
> The "pain" only occurs when writing the SQL statemen
Michal Migurski wrote:
In my experience, it's usually a safe assumption that if you have a bunch
of tables all structured identically and used in similar ways, you should
probably merge them all into a single table with an extra column that
corresponds to whatever differentiating characteristic use
> This isn't always desirable, or even possible. I once designed a
> database to hold characteristics for a series of 70 different tests.
> There were about 50 different characteristics used in various
> combinations for each test. Each characteristic could be one of many
> values. So the charac
This isn't always desirable, or even possible. I once designed a database to
hold characteristics for a series of 70 different tests. There were about 50
different characteristics used in various combinations for each test. Each
characteristic could be one of many values. So the characterist
John W. Holmes wrote:
Dave Carrera wrote:
Hi List,
How do I select data from 24 table in my database.
Each one is identical in structure layout being
Id,name,list
The first thing you need to do is reorganize your database schema and
put all of this into one table. You can see what a pain it
Dave Carrera wrote:
Hi List,
How do I select data from 24 table in my database.
Each one is identical in structure layout being
Id,name,list
The first thing you need to do is reorganize your database schema and
put all of this into one table. You can see what a pain it is having 24
similar ta
Dave Carrera wrote:
Hi List,
How do I select data from 24 table in my database.
Each one is identical in structure layout being
Id,name,list
I want to select where like $_POST[var] from a form all of the tables but I
am having trouble :(
I thought making a var string like
$string = "table1,ta
print"$row[img]";
}
?>
Not sure why it only displays just the titletext.
-Original Message-
From: Martin Towell [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 8:47 AM
To: Bruce Levick; [EMAIL PROTECTED]
Subject: RE: [PHP] select * From
can you post some
can you post some more of your code? I think, if it's not too big, the
entire while loops
Martin
-Original Message-
From: Bruce Levick [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 9:45 AM
To: [EMAIL PROTECTED]
Subject: [PHP] select * From
Hi,
Am just a newbie at this
Couple of other tips for you.
1. SELECT * is bad unless you really need every field. If you don't, specify
which ones you want - the query will perform better.
$s = "SELECT * FROM News"; // bad
$s = "SELECT NewsHeadline, NewsTeaser FROM News"; // better
2. You appear to be connecting to your
In your query add ORDER BY "field name like date or ID" DESC.
That way it will put them in descending order and I do believe that is what
you're looking for :)
Jeff
- Original Message -
From: "Tarrant Costelloe" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 29, 2001
> select * from nmensagem m, nusuario u, nprefuser p where
> m.cdpreferencia=p.cdpreferencia and p.flag=1;
>
> With "m.cdpreferencia=p.cdpreferencia" I should get just the values there
> exists on m.preferencia and p.cdpreferencia?
No, because you have a record for every single nusario, since you
18 matches
Mail list logo