jc-freak
Mitglied
Ich versuche vergeblich mit dem unten angegeben Code Daten von einer in eine anderer Tabelle zu kopieren. Ich weiß leider nicht weiter.
ich bekomme folgende Fehlermeldung:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\sebbrandt\includes\user_update.php on line 19
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\sebbrandt\includes\user_update.php on line 20
PHP:
<?
/* ########## MySQL Daten ########### */
$host = "localhost";
$user = "v028325";
$password = "******";
$dbname = "v028325";
/* ######## MySQL Connect... ######## */
$con = mysql_connect($host, $user, $password);
$db = mysql_select_db($dbname) or print mysql_error();
$resultgal = mysql_query("SELECT * FROM gal_users ORDER BY user_id ASC") or print mysql_error();
$countgal = mysql_num_rows($resultgal);
$datengal = mysql_fetch_array($resultgal);
$resultpun = mysql_query("SELECT * FROM punbb_users ORDER BY user_id ASC") or print mysql_error();
$countpun = mysql_num_rows($resultpun);
$datenpun = mysql_fetch_array($resultpun);
/* ############# Daten ############## */
while($countgal >= $i){
$usernamegal = $datengal[user_name];
$passwordgal = $datengal[password];
$emailgal = $datengal[user_email];
$registeredgal = $datengal[user_joindate];
$usernamepun = $datenpun[username];
if($usernamegal != $usernamepun){
mysql_query("INSERT INTO punbb_users VALUES ('','','$usernamegal','$passwordgal','$emailgal','','','','','','','','','','','','','','','','','','','','','','','German','Cornflower','','','$registeredgal','','','','','')") or print mysql_error() ;
}
$i++;
}
?>
ich bekomme folgende Fehlermeldung:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\sebbrandt\includes\user_update.php on line 19
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\sebbrandt\includes\user_update.php on line 20