projects
/
fa-stable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
732853c
)
Fixed table selection query in sanitize_database().
author
Janusz Dobrowolski
<janusz@frontaccounting.eu>
Sat, 24 Oct 2009 09:04:33 +0000
(09:04 +0000)
committer
Janusz Dobrowolski
<janusz@frontaccounting.eu>
Sat, 24 Oct 2009 09:04:33 +0000
(09:04 +0000)
sql/alter2.2.php
patch
|
blob
|
history
diff --git
a/sql/alter2.2.php
b/sql/alter2.2.php
index e94187d38e8a7ef2b8ef223950f0ac6ac8bad6c2..c5345233f9dad968a351735b71f50b2df0a31924 100644
(file)
--- a/
sql/alter2.2.php
+++ b/
sql/alter2.2.php
@@
-287,7
+287,7
@@
function sanitize_database($pref, $test = false) {
if ($test)
error_log('Sanitizing database ...');
- $tsql = "SHOW TABLES LIKE '
{$pref}
%'";
+ $tsql = "SHOW TABLES LIKE '
".($pref=='' ? '' : substr($pref,0,-1).'\\_')."
%'";
$tresult = db_query($tsql, "Cannot select all tables with prefix '$pref'");
while($tbl = db_fetch($tresult)) {
$table = $tbl[0];