- Tidied up some SQL queries.

4.2.x
Dries Buytaert 2003-01-21 22:35:54 +00:00
parent 966f0811a2
commit d6adac7421
2 changed files with 6 additions and 6 deletions

View File

@ -60,14 +60,14 @@ function locale_link($type) {
}
function locale_delete($lid) {
db_query("DELETE FROM locales WHERE lid = '$lid'");
db_query("DELETE FROM locales WHERE lid = '%d'", $lid);
locale_refresh_cache();
}
function locale_save($lid) {
global $edit;
foreach ($edit as $key=>$value) {
db_query("UPDATE locales SET $key = '%s' WHERE lid = '$lid'", $value);
db_query("UPDATE locales SET $key = '%s' WHERE lid = '%d'", $value, $lid);
}
locale_refresh_cache();
// delete form data so it will remember where it came from
@ -277,4 +277,4 @@ function locale($string) {
return $string;
}
?>
?>

View File

@ -60,14 +60,14 @@ function locale_link($type) {
}
function locale_delete($lid) {
db_query("DELETE FROM locales WHERE lid = '$lid'");
db_query("DELETE FROM locales WHERE lid = '%d'", $lid);
locale_refresh_cache();
}
function locale_save($lid) {
global $edit;
foreach ($edit as $key=>$value) {
db_query("UPDATE locales SET $key = '%s' WHERE lid = '$lid'", $value);
db_query("UPDATE locales SET $key = '%s' WHERE lid = '%d'", $value, $lid);
}
locale_refresh_cache();
// delete form data so it will remember where it came from
@ -277,4 +277,4 @@ function locale($string) {
return $string;
}
?>
?>