|
From: Jon O. <jon...@us...> - 2005-09-22 21:26:14
|
Update of /cvsroot/mxbb/mx_profilecp/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5288/modules/mx_profilecp/tools Modified Files: tools_groules_buddy_list_to_pcp.php tools_niels_birthday_to_pcp.php Log Message: update Index: tools_groules_buddy_list_to_pcp.php =================================================================== RCS file: /cvsroot/mxbb/mx_profilecp/tools/tools_groules_buddy_list_to_pcp.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tools_groules_buddy_list_to_pcp.php 29 Jun 2004 22:27:48 -0000 1.1 --- tools_groules_buddy_list_to_pcp.php 22 Sep 2005 21:26:05 -0000 1.2 *************** *** 27,31 **** $olds = array(); $sql = "SELECT * FROM " . $table_prefix . "buddies ORDER BY user_id, buddy_id"; ! if (!$result = $db->sql_query ($sql)) message_die (GENERAL_ERROR, 'Could not read old buddy list', __LINE__, __FILE__, $sql); while ($row = $db->sql_fetchrow($result) ) $olds[] = $row; --- 27,31 ---- $olds = array(); $sql = "SELECT * FROM " . $table_prefix . "buddies ORDER BY user_id, buddy_id"; ! if (!$result = $db->sql_query ($sql)) mx_message_die (GENERAL_ERROR, 'Could not read old buddy list', __LINE__, __FILE__, $sql); while ($row = $db->sql_fetchrow($result) ) $olds[] = $row; *************** *** 37,41 **** // check if exist $sql= "SELECT * FROM " . BUDDYS_TABLE . " WHERE user_id=$user_id and buddy_id=$buddy_id"; ! if (!$result = $db->sql_query ($sql)) message_die (GENERAL_ERROR, 'Could not read new buddy list', __LINE__, __FILE__, $sql); if ( !($row = $db->sql_fetchrow($result)) ) { --- 37,41 ---- // check if exist $sql= "SELECT * FROM " . BUDDYS_TABLE . " WHERE user_id=$user_id and buddy_id=$buddy_id"; ! if (!$result = $db->sql_query ($sql)) mx_message_die (GENERAL_ERROR, 'Could not read new buddy list', __LINE__, __FILE__, $sql); if ( !($row = $db->sql_fetchrow($result)) ) { *************** *** 52,56 **** 0 )"; ! if (!$result = $db->sql_query ($sql)) message_die (GENERAL_ERROR, 'Could not insert a guy in new buddy list', __LINE__, __FILE__, $sql); } } --- 52,56 ---- 0 )"; ! if (!$result = $db->sql_query ($sql)) mx_message_die (GENERAL_ERROR, 'Could not insert a guy in new buddy list', __LINE__, __FILE__, $sql); } } Index: tools_niels_birthday_to_pcp.php =================================================================== RCS file: /cvsroot/mxbb/mx_profilecp/tools/tools_niels_birthday_to_pcp.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tools_niels_birthday_to_pcp.php 29 Jun 2004 22:27:48 -0000 1.1 --- tools_niels_birthday_to_pcp.php 22 Sep 2005 21:26:05 -0000 1.2 *************** *** 73,77 **** { $sql = "SELECT user_id, user_birthday_sav, user_birthday FROM " . USERS_TABLE . " ORDER BY user_id"; ! if ( !( $result = $db->sql_query($sql) ) ) message_die(GENERAL_ERROR, 'Wasn\'t able to read users table', '', __LINE__, __FILE__, $sql); while ($row = $db->sql_fetchrow($result)) { --- 73,77 ---- { $sql = "SELECT user_id, user_birthday_sav, user_birthday FROM " . USERS_TABLE . " ORDER BY user_id"; ! if ( !( $result = $db->sql_query($sql) ) ) mx_message_die(GENERAL_ERROR, 'Wasn\'t able to read users table', '', __LINE__, __FILE__, $sql); while ($row = $db->sql_fetchrow($result)) { *************** *** 83,87 **** { $sql = "UPDATE " . USERS_TABLE . " set user_birthday = '" . $user_birthday . "' WHERE user_id = " . $row['user_id']; ! if ( !($db->sql_query($sql)) ) message_die(GENERAL_ERROR, 'Wasn\'t able to update users table', '', __LINE__, __FILE__, $sql); $updated = true; $count_upd++; --- 83,87 ---- { $sql = "UPDATE " . USERS_TABLE . " set user_birthday = '" . $user_birthday . "' WHERE user_id = " . $row['user_id']; ! if ( !($db->sql_query($sql)) ) mx_message_die(GENERAL_ERROR, 'Wasn\'t able to update users table', '', __LINE__, __FILE__, $sql); $updated = true; $count_upd++; |