Warning: mysql_insert_id() [function.mysql-insert-id]: A link to the server could not be established in /home/.beeswax/sadasd/asda.com/modules/mod_register.php on line 46
Sorry, but there is a problem with our scripts!
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 1' at line 1
UPDATE members SET highest_rank=2015 WHERE id= LIMIT 1
mod_register.php: 33. satırdan itibaren.
if ( isset( $error ) )
$message = "<strong>Error</strong>: ".$error;
else
{
$username = trim(stripslashes($_POST["username"]));
$password = stripslashes($_POST["password"]);
$email = strtolower(trim(stripslashes($_POST["email"])));
$username = preg_replace("/\s{2,}/", ' ', $username);
$db->query( "INSERT INTO members ( username, password, email, ".
"joined, last_updated ) VALUES ( '".
$db->escape( $username )."', '".md5($password)."', '".
$db->escape( $email )."', UNIX_TIMESTAMP(), UNIX_TIMESTAMP() )" );
$insert_id = mysql_insert_id();
$db->query( "SELECT * FROM members" );
$rank = $db->countRows();
$db->query( "UPDATE members SET highest_rank=".$rank." WHERE id=".$insert_id." LIMIT 1" );
$db->query( "UPDATE sessions SET member_id=".$insert_id.", admin='0' WHERE id='".
session_id()."' LIMIT 1" );
$ref = htmlentities( stripslashes( $_POST["ref"] ) );
$ref = empty( $ref )? "/" : $ref;
?>nasıl düzeltebilirim