在這裏輸入代碼我正在寫插入查詢,但是當我運行這個錯誤顯示。插入查詢問題?
您的SQL語法錯誤;請檢查與您的MySQL服務器版本對應的手冊,以便在第11行的'選擇'附近使用正確的語法。
這裏是代碼。
if(isset($_POST['Submit']))
{
$query= "INSERT INTO ambition_opportunities SET
opp_provider='".$_POST['provider']."',
opp_category='".$_POST['category']."',
opp_pre_location ='".$_POST['prelocation']."',
opp_industry='".$_POST['Industry']."',
opp_qualification='".$_POST['qualification']."',
opp_decipline='".$_POST['Decipline']."',
opp_scale='".$_POST['scale']."',
opp_want='".$_POST['want']."',
opp_functional='".$_POST['functional']."',
opp_email='".$_POST['email'].",
opp_yourself='".$_POST['yourself']."',
opp_opportunity='".$_POST['opp']."',
opp_organization='".$_POST['Orga']."',
opp_add_location='".$_POST['loca']."',
opp_deadline='".$_POST['deadline']."',
opp_source='".$_POST['source']."',
opp_start='".$_POST['calender1']."',
opp_end='".$_POST['calender2']."',
opp_prize='".$_POST['prize']."',
opp_about_organization='".$_POST['organization']."',
opp_about_opportunity='".$_POST['Oppurtunity']."',
opp_eligibity='".$_POST['Eligibilty']."',
opp_offer='".$_POST['Offer']."',
opp_application='".$_POST['Application']."',
opp_status='".$_POST['status']."'";
$sql = mysql_query($query) or die(mysql_error());
}
?>
請幫助我..
感謝
'var_dump($ sql)'的內容是什麼? – Fluffeh 2012-08-16 12:10:38
此查詢中沒有「選擇」...您確定您的錯誤在這裏? – 2012-08-16 12:11:20
@MihaiIorga它是如果有''_POST'虛空變量。 – Fluffeh 2012-08-16 12:11:25