Why are ` needed
Posted: Tue Aug 23, 2005 2:50 am
I’m unsure why the `250_champ` and `date` below uses ` instead of a quote. What is the reason for these? I appreciate that Dreamweaver is not everybody’s choice but I’m studying the code that this programme produces and although I generally see a lot of unnecessary extra written code been written not to say unsafe stuff too but I’m puzzled about why these little ` are used.
Many thanks
B
Sample
Many thanks
B
Sample
Code: Select all
$insertSQL = sprintf("INSERT INTO paypal (`date`, first_name, last_name, address, champ_no, support_no, `250_champ`, phone, mobile, email, ip) VALUES (CURDATE(), %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
//GetSQLValueString($_POST['date'], "text"),
GetSQLValueString("$f_name_message", "text"),
GetSQLValueString("$l_name_message", "text"),
GetSQLValueString("$address_message", "text"),
GetSQLValueString(isset($_POST['champ_no']) ? "true" : "", "defined","'Yes'","'No'"),
GetSQLValueString(isset($_POST['support_no']) ? "true" : "", "defined","'Yes'","'No'"),
GetSQLValueString(isset($_POST['0_champ']) ? "true" : "", "defined","'Yes'","'No'"),
GetSQLValueString($_POST['phone'], "text"),
GetSQLValueString($_POST['mobile'], "text"),
GetSQLValueString($_POST['email'], "text"),
GetSQLValueString($_POST['ip'], "text"));