Re: find (matching) person in other table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/30/07, Jared Farrish <farrishj@xxxxxxxxx> wrote:

$lastname = strpos('Rogers',0,2);
$firstname = strpos('Timothy',0,2);
$select = "SELECT `uid`,`LastName`,`FirstName`
                FROM `users`
                WHERE LastName='$lastname%'
                AND FirstName='$firstname%'";


Strike the above and make it:

$lastname = substr('Rogers',0,3);
$firstname = substr('Timothy',0,3);
$select = "SELECT `uid`,`LastName`,`FirstName`
          FROM `users`
          WHERE LastName='$lastname%'
          AND FirstName='$firstname%'";

Foolisness!

--
Jared Farrish
Intermediate Web Developer
Denton, Tx

Abraham Maslow: "If the only tool you have is a hammer, you tend to see
every problem as a nail." $$

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux