Joshua wrote:Ratburntro44 wrote:Joshua wrote:You write it then.
I don't have access to Lopdo's database. Nor do I even want all the names to be capitalized.
So write it without the database, just write it in a post.
Haven't tested it, but this should work:
- Code: Select all
$db_host = '';
$db_name = '';
$db_user = '';
$db_pass = '';
$db_port = '';
$table_user = '';
$column_id = '';
$column_username = '';
$connection = new mysqli($db_host,$db_user,$db_pass,$db_name,$db_port);
$names = $connection->query("SELECT $column_username FROM $table_user ORDER BY $column_id ASC");
$names_array = $names->fetch_array(MYSQLI_NUM);
$counter = 0;
while(isset($names_array[$counter])) {
$names_caps = ucfirst($names_array[$counter]);
$user_id = $counter+1;
$connection->query("UPDATE $table_user SET $column_username=$names_caps WHERE $column_id=$user_id")
$counter++;
}
Obviously a few variables need to be given values, because I don't know what those values are without going into phpbb and Lopdo's database. Other than that, I think it should work.