lkeeton wrote:
> I am having problems using the LIKE and doing numeric comparisons in the PERL
> API. If I use it directly to MYSQL it works perfectly and returns one record.
> With Limit it just allows you up to 10. I don't know if it's a bug in the DBD
> drivers. But this statement does work in MySql. But I do know of instances
> where the Perl API SQL statemement maybe a little different then the straight
> SQL to MYSQL.
>
> if ($button eq 'next' and $category eq 'off' and $deals eq 'off' and $fams eq
> 'off' and $title eq 'on')
>
> right here is the error********************** It doesn't like something here
> {push(@body_query,"bigkey > $lastkey AND product_name LIKE '%$param%'");}
>
> here is the error log
> DBD::mysql::st execute failed: You have an error in your SQL syntax near
> 'bigkey > 909 and product_name LIKE '%Brothers%'
> LIMIT 10
my $where=join(" ", @body_query);
>
> $sth =
> $dbh->prepare( " SELECT date_video.product_name, date_video.pthumbs,
> date_video.synopsis, date_video.ourprice, date_video.bigkey, date_video.stars,
> date_video.voldiscount, date_video.item
> FROM $table_date
WHERE $where
>
> LIMIT 10
> " );
>
> --
Try this.