$table_name = 'tbl_users';
$data = array('datetime'=>'NOW()',
'ipadress' => $ipaddress,
'name' => $name,
'dob' => $dob,
'nationality' => $nationality,
'address' => $address,
'city' => $city,
'state' => $state,
'pincode' => $pincode,
'phone' => $phone,
'email' => $email,
'mobile' => $mobile,
'weight' => $weight,
'height'=> $height,
'marital' => $marital,
'degree' => $degree,
'institute' => $institute,
'special' => $special,
'yearofpaas' => $yearofpaas,
'grade' => $grade,
'emplyment_history' => $emplyment_history,
'merits' => $merits,
'major_achivements' => $major_achivements,
'interview_attended' => $interview_attended,
'details' => $details,
'minctc_position' => $minctc_position,
'cv_file' => $cv_file,
'declaration' => $declaration);
echo "<pre>";
print_r($data);
drupal_write_record($table_name, $data);
我有這樣的插入查詢,但不知何故記錄不給任何人table..can要在請幫我...什麼在查詢中的問題?????插入查詢在Drupal 7
的問題可能會是' '日期時間'=> 'NOW()''線。 Drupal將(正確)將其作爲參數轉義,並且'datetime'字段將驗證失敗。看看http://drupal.stackexchange.com/questions/35465/how-to-set-a-datetime-field-now-during-insert – Clive