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
Hi to all,
It's more mysql question than php, but I like you more than mysql guys! :)
Let's say I have a table called "orders" and other table called
"special_orders_instructions".
Logically, one column in "orders" table should be link to
"special_order_instructions" (foreign key ?) and if that
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
Hi i have a football tipping database and i need to extract certain records
from a users 'selections' table
table name 'Selections'
(rows) RoundGameName Winner Points
data eg 1 1mark Hawthorn 4
(if team is a winner then 4 points
* 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
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,table2,table3,.";
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 newb
Hi,
Am just a newbie at this and was going great until I have hit this smell
snag.
I am connecting to mysql and all works well there. I query a table
"Illustrations" ($query = "SELECT * FROM Illustrations";), and want to
print the values of two columns ("titletext" & "img")within each row as
the r
o: '[EMAIL PROTECTED]'
Subject: [PHP] SELECT * FROM
Hello all,
I have a designing a website of which people can submit news to, this works
fine. Just on the main page I have the following code (snippet);
Any help would be gratefully apreciated!
Kind Regards
Tarrant Costelloe (
ECTED]>
Sent: Wednesday, August 29, 2001 10:55 AM
Subject: [PHP] SELECT * FROM
> Hello all,
> I have a designing a website of which people can submit news to, this
works
> fine. Just on the main page I have the following code (snippet);
>
> $db = mysql_connect("localhost&quo
Hello all,
I have a designing a website of which people can submit news to, this works
fine. Just on the main page I have the following code (snippet);
\n";
do {
printf("Title: %s By: %s |
Date: %s Article: %s URL: Click here\n", $myrow["title"],
$myrow["nickname"],$myrow["created"],$my
> 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
Something is not working here:
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?
thanks,
Augusto
--
PHP General Mailin
24 matches
Mail list logo