In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("Trond Erling Hundal") wrote:

> I want to query two tables in my db. One containing a list of numbers
> ranging from 10000 - 10200, the other table is storing information that is
> relative to some of the numbers:
> Eks:
> Table1.record1:  number=10000
> Table2.record1:  number=10000 name=John
> Now I want to query these to tables to show a table that has one column with
> the numbers, and if there is a name stored in the other table for this
> number, I want to display this.


select table1.number as num, name FROM table1
left join table2 using (number)


PHP Database Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to