this the error i am getting:
DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<> 'Yes'' at line 6 at admin.pl line 2316.
this is the code i am using
use strict;
use warnings;
use DBI;
my $userid = DB::trim( param('Userid') ); # ??
my $username = DB::trim( param('Username') );
my $password = DB::trim( param('Password') );
my $DISABLED = ucfirst ( DB::trim( param('Disabled') ) || '' );
$DISABLED = 'No' unless $DISABLED eq 'Yes';
my $sql = 'SELECT ID,Disabled
FROM EmployerJobs
WHERE Username = ?
AND Password = ?
AND USERID = ?
AND Disabled = <> ?';
my $dbh = DB::connect();
my $tbl_info = DB::TableInfo->get ($dbh, "EmployerJobs");
my $sth = $dbh->prepare($sql);
$sth->execute($username, $password, $userid, $DISABLED);
while ( my $row = $sth->fetchrow_hashref() ){
param (-name => "Disabled", -value => $DISABLED);
param (-name => "ID", -value => $row->{ID});
$tbl_info->update_record ($dbh, "ID");
#print "Content-Type: text/html\n\n";
#printf "Updated ID '%s' from '%s' to '%s'\n",$row->{ID},$row->{DISA
+BLED},$DISABLED;
};
Any help would be greatly appreciated, Thanks.