Skip to content
Snippets Groups Projects
Commit 3a488a4a authored by Tomáš Plesník's avatar Tomáš Plesník
Browse files

zmena na vypis pouze validnich klientu

parent 1bba667b
No related branches found
No related tags found
No related merge requests found
...@@ -56,7 +56,7 @@ our $DBH = DBI->connect("DBI:mysql:database=$WardenCommon::DB_NAME;host=$WardenC ...@@ -56,7 +56,7 @@ our $DBH = DBI->connect("DBI:mysql:database=$WardenCommon::DB_NAME;host=$WardenC
|| die "Could not connect to database: $DBI::errstr"; || die "Could not connect to database: $DBI::errstr";
# obtain data from DB # obtain data from DB
my $sth = $DBH->prepare("SELECT * FROM clients ORDER BY client_id ASC;") or die "Cannot prepare statement: " . $DBH->errstr; my $sth = $DBH->prepare("SELECT * FROM clients WHERE valid = 't' ORDER BY client_id ASC;") or die "Cannot prepare statement: " . $DBH->errstr;
$sth->execute or die "Cannot execute statement: " . $sth->errstr; $sth->execute or die "Cannot execute statement: " . $sth->errstr;
my $hash_ref = $sth->fetchall_hashref("client_id"); my $hash_ref = $sth->fetchall_hashref("client_id");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment