Closed GoogleCodeExporter closed 9 years ago
Maybe it can be improved a bit, so that:
* If there aren't selected rows but there are modified ones, phpliteadmin will
only say the number of modified ones.
* If there are selected rows but there aren't modified ones, phpliteadmin will
only say the number of selected ones.
* Otherwise, phpliteadmin will say both numbers.
Something like
if(sizeof($result) || !$db->getAffectedRows())
{
printf($lang['show_rows'], sizeof($result));
}
if($db->getAffectedRows() || !sizeof($result))
{
echo $db->getAffectedRows()." ".$lang['rows_aff']." ";
}
instead of just
printf($lang['show_rows'], sizeof($result));
echo $db->getAffectedRows()." ".$lang['rows_aff']." ";
Original comment by Loiroor...@gmail.com
on 3 Sep 2013 at 2:52
Agreed.
Original comment by crazy4ch...@gmail.com
on 28 Dec 2014 at 12:38
Original comment by crazy4ch...@gmail.com
on 28 Dec 2014 at 12:39
There is a problem with this approach of getting the error. Executing this
query in the SQL tab:
SELECT non_existing FROM "test";
SELECT * FROM "test";
The first query will show "ERROR: no such column: non_existing" correctly. But
the second one will also show this, because getting the last error still
returns this error.
Instead of checking if getError() is NULL, we need to check if $result is not
NULL.
Other than that the proposed fix is good. I am going to commit it in a minute.
Original comment by crazy4ch...@gmail.com
on 28 Dec 2014 at 2:06
Fixed with revision 1f93ebad304820b2418ed2231a4827a89bb0776a.
Original comment by crazy4ch...@gmail.com
on 28 Dec 2014 at 2:14
Original issue reported on code.google.com by
Loiroor...@gmail.com
on 30 Aug 2013 at 5:28