Re: Brick Codes
| From: | Ignatius Reilly | Date: | Tue, 17 Feb 2004 10:12:51 +0000 |
| Subject: | Re: Brick Codes | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-32977@lists.php.net to get a copy of this message | ||
Hmmm...
Better try:
WHERE (LEFT( Brick,3) = LEFT(
Post Code,3))
^^ no quotes ^^ back ticks (because of the
space in the column name)
HTH
Ignatius
_________________________
----- Original Message -----
From: "Ricardo Lopes" <lopes@elevaconsult.pt>
To: "Shaun" <shaun@mania.plus.com>
Cc: "PHP DB" <php-db@lists.php.net>
Sent: Tuesday, February 17, 2004 10:23
Subject: Re: [PHP-DB] Brick Codes
> That may depend of what database server you are using, for mysql you can
> use:
>
> ........ WHERE (LEFT('Brick',3) = LEFT(Post Code,3))
>
> If you are using other dbserver, check your manual.
>
> ----- Original Message -----
> From: "Shaun" <shaun@mania.plus.com>
> To: <php-db@lists.php.net>
> Sent: Monday, February 16, 2004 10:45 PM
> Subject: [PHP-DB] Brick Codes
>
>
> > Hi,
> >
> > I have a table of Locations around the country. My system produces
reports
> > based on these Locations. I also have a table containing Brick Codes
e.g.
> >
> > Brick Post Code
> > AB51 AB51
> > AB52 AB52
> > AB55 AB55
> > AB56 AB56
> > AL01 AL1
> > AL02 AL2
> > AL03 AL3
> > AL04 AL4
> >
> >
> > How can I compare the first 3 or 4 letters of the postcode in the
> Locations
> > table to the corresponding entry in the Brick Codes table so I can add
it
> to
> > my report?
> >
> > Thanks for your help
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>