[Lias] RE: [SLUG] PHP help

Visser, Martin (SNO) Martin.Visser at compaq.com
Thu Aug 16 13:46:05 UTC 2001


An awesome tutorial that actual works ( I got my first PHP/MySql/Apache
thing happening by following the tute directly) can be found at
http://hotwired.lycos.com/webmonkey/programming/php/tutorials/tutorial4.html

Martin Visser
Network Consultant - Compaq Global Services

Compaq Computer Australia
410 Concord Road
Rhodes, Sydney NSW 2138
Australia

Phone: +61-2-9022-5630
Mobile: +61-411-254-513
Fax:+61-2-9022-7001
Email:martin.visser at compaq.com



-----Original Message-----
From: Simon Bryan [mailto:sbryan at mpx.com.au]
Sent: Thursday, 16 August 2001 1:35 PM
To: Matthew Palmer
Cc: slug at slug.org.au; lias at lists.linux.org.au
Subject: Re: [SLUG] PHP help


Thanks Mathew,
I have some experience with SQL but none with expressing it in terms that 
PHP understands, will take you suggestion and see where it leads me.

Cheers,

At 12:19 16/08/2001, Matthew Palmer wrote:
>On Thu, 16 Aug 2001, Simon Bryan wrote:
>
> > I am trying to modify a query in PHP that is running against a MYSQL
> > database. At the moment the query searches a field called 'contents' in 
> the
> > 'tracking' table. (see below) I would like to be able to search on the
> > 'computer' field in this table. Which I can do OK, however the field in
> > this table simply contains the ID number of the computer from the
computer
> > table. The computer table, amongst other things contains the ID and a
text
> > Description, it is this description that I would like the users to be
able
> > to enter.
>
>Sounds to me like it's SQL help you need, rather than PHP.
>
>OK, to match the contents of one field against another, use a join.  You
cna
>do it by having a member of your where clause with the form
>
>table1.column1=table2.column2
>
>and the tables are joined for that query.
>
>So, for this query, you might do:
>
>select description from computer where tracking.contents LIKE $contains and
>contents.id=computer.id
>
>This is the best guess I can make on the query from the info given.
>
>I'd suggest getting a good book on database design and SQL syntax.
>
>
>--
>-----------------------------------------------------------------------
>#include <disclaimer.h>
>Matthew Palmer
>mjp16 at ieee.uow.edu.au



Simon Bryan


-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug



More information about the lias mailing list