(This post was last modified: 14.12.2011, 18:03 by SlimShady95.)
14.12.2011, 13:56
Well, create a new file in htdocs (Where index.php is located) and then insert following code:
Then go to http://localhost/NAMEOFFILE.php
Edit: ALTER Warum hab ich das auf Englisch geschrieben? :O
MfG Manuel
PHP Code:
<?php
include('include/config.php');
// Datenbankverbindung
$conn = mysql_connect($config['db_host'], $config['db_user'], $config['db_pw']);
mysql_select_db($config['db_name']);
// Alle Dörfer auslesen
$query = mysql_query('SELECT `id`, `name` FROM `villages`');
while($row = mysql_fetch_assoc($query)) {
if(trim($row['name']) == '' or strlen(trim($row['name'])) == 0) {
$query2 = mysql_query('UPDATE `villages` SET `name` = \'Cheat0r!\' WHERE `id` = ' . $row['id']);
}
}
print 'Finished';
?>
Then go to http://localhost/NAMEOFFILE.php
Edit: ALTER Warum hab ich das auf Englisch geschrieben? :O
MfG Manuel