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

Re: JOIN NOT WORKING!!


Mike Podlesny wrote:
> 
> The following statement is not returning any results even though it should
> return 1 record.  I am trying to join a table called Categories with a table
> called SubCategories on the appropriate indexes where a certain subcategory
> was selected.
> 

my $subcat=$fields{'subcategory'};

> $sth = $dbh->prepare("SELECT Categories.Category_Name FROM Categories,
> SubCategories WHERE Categories.Category_Index=SubCategories.Category_Index
AND SubCategory_Name=$subcat");

#> AND SubCategory_Name='$fields{'subcategory'}'");
>

-- 
---------------------------------------------------------------------
Please check "http://www.mysql.com/documentation/manual.php"; before
posting. To request this thread, e-mail mysql-thread60388@xxxxxxxxxxxxxxx

To unsubscribe, send a message to:
    <mysql-unsubscribe-treed=ultraviolet.org@xxxxxxxxxxxxxxx>

If you have a broken mail client that cannot send a message to
the above address (Microsoft Outlook), you can use:
    http://lists.mysql.com/php/unsubscribe.php



This mailing list archive is a service of Copilot Consulting.