co.ador Posted December 15, 2009 Share Posted December 15, 2009 I have set up SET NAMES in the method below don't know if it is properly placed any suggestions becuase the rating system still doesn't work and want to know if The SET NAMES is all set and continue looking for another possible source for the problem. <?php public static function ExecuteQuery( $sql, $name) { if (self::$connection) { if (strlen(trim($name)) != 0) { switch (self::$type) { case "mysql": if (!array_key_exists($name, self::$savedQueries)) { self::$savedQueries[$name] = @mysql_query( "SET NAMES 'utf8'", $sql, self::$connection) or Error::LogError("Query Failed", mysql_error(self::$connection)); } break; case "mysqli": if (!array_key_exists($name, self::$savedQueries)) { self::$savedQueries[$name] = @mysqli_query(self::$connection, $sql) or Error::LogError("Query Failed", mysqli_error(self::$connection)); } break; } return self::$savedQueries[$name]; }?> Link to comment https://forums.phpfreaks.com/topic/185266-is-set-names-properly-place-inside-this-method/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.