in reply to Re: Ordering Template cards
in thread Ordering Template cards
In the original question I did put it was untested and showed the query as:
But you are right to point out this undefined behaviour. However, when written as you suggest, it always returns true (I haven't completely got my head around why) and the loop doesn't end. It needs to be written like this:y $cards = $dbh->prepare("SELECT Card_idCard FROM CardList WHERE User_ +idUser = $user_number AND visible = 1 ORDER BY metric");
my $card; while (($card) = $cards->fetchrow_array)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Ordering Template cards
by haukex (Archbishop) on Jan 26, 2021 at 10:30 UTC | |
by LanX (Saint) on Jan 26, 2021 at 12:32 UTC | |
by haukex (Archbishop) on Jan 26, 2021 at 12:36 UTC | |
by LanX (Saint) on Jan 26, 2021 at 12:41 UTC | |
by Bod (Parson) on Jan 28, 2021 at 01:07 UTC | |
|
Re^3: Ordering Template cards
by Marshall (Canon) on Jan 26, 2021 at 02:42 UTC | |
by bliako (Abbot) on Jan 26, 2021 at 10:38 UTC | |
by Marshall (Canon) on Jan 28, 2021 at 06:30 UTC | |
by bliako (Abbot) on Jan 28, 2021 at 10:19 UTC | |
by Marshall (Canon) on Jan 30, 2021 at 01:42 UTC | |
|
Re^3: Ordering Template cards
by LanX (Saint) on Jan 26, 2021 at 05:19 UTC | |
by Bod (Parson) on Jan 28, 2021 at 01:10 UTC |