Welcome, guest! Login / Register - Why register?
[email protected] webmail now available. Want one? Go here.

Paste

N/A
Pasted as Perl by Nks ( 12 years ago )
my $block = "(`id`, `login`, `password`, `email`";
 my $val = "(NULL, '$login', '$password', '$email'"; 
 if ($name)   { $block .= ", `name`";  $val .= ", '$name'";}
 if ($surname) { $block .= ", `surname`"; $val .= ", '$surname'";}
 if ($lastname) { $block .= ", `lastname`"; $val .= ", '$lastname'";}
 if ($city)  { $block .= ", `city`";  $val .= ", '$city'";}
 if ($address) { $block .= ", `address`"; $val .= ", '$address'";}
 if ($hobbie) { $block .= ", `hobbie`"; $val .= ", '$hobbie'";}
 if ($about)  { $block .= ", `about`"; $val .= ", '$about'";}
 $block .= ", `regtime`)"; $val .= ", '$timer');";
 my $query .= "INSERT INTO `users` $block VALUES $val";
 my $res = DBWork::Query($query);
 return $res;

 

Revise this Paste

Your Name: Code Language: