summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-05-30 12:20:42 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-05-30 12:20:42 -0400
commita262f83210f6a405bfe79148b52387d1dbdd9a5d (patch)
treeb4f0e32080a62a1389d5aad2939202bb17ae7f63 /scripts
parent7b1a72da307694bee40a2278482003855a2a2ab1 (diff)
use mysqli_set_charset instead of set names
Diffstat (limited to 'scripts')
-rw-r--r--scripts/fixup_utf8.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/fixup_utf8.php b/scripts/fixup_utf8.php
index 67f9c4623..925da2484 100644
--- a/scripts/fixup_utf8.php
+++ b/scripts/fixup_utf8.php
@@ -121,10 +121,14 @@ function doConnect($charset)
return NULL;
}
- $result = $db->query("SET NAMES $charset");
+// $result = $db->query("SET NAMES $charset");
- if (PEAR::isError($result)) {
- echo "ERROR: " . $result->getMessage() . "\n";
+ $conn = $db->connection;
+
+ $succ = mysqli_set_charset($conn, $charset);
+
+ if (!$succ) {
+ echo "ERROR: couldn't set charset\n";
$db->disconnect();
return NULL;
}