看板 PHP 關於我們 聯絡資訊
$str="select * from customers where cid='$_POST\[\'old_name\'\]';"; 如果這樣寫的話會有錯誤訊息: Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in C:\Program Files\Apache Group\Apache2\htdocs\Mysql.php on line 20 但是如果改成 $str="select * from customers where cid='$old_name';"; 就沒問題,想問一下要怎麼樣才能用上面的那個方法呢?? 有經驗的人麻煩指導一下,多謝 還有一個問題就是,我的mysql裡面的資料表明明有存中文的東西,可是上面那樣 query卻得不到結果,後來我發現是因為西歐語系的關係, 總之問題就是輸入中文的話不會得到結果的狀況.... 有人有經驗可以分享一下嗎?? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.161.17.217 ※ 編輯: kc655039 來自: 218.161.17.217 (10/02 17:44)
kc655039:用107篇的方法也無效 10/02 17:48