I) (mysql_error ile ölüyor PHP sorguda bir sql çalıştırıyorum
Unknown column '' in 'field list'
Sorgu:
SELECT `standard` AS fee FROM `corporation_state_fee` WHERE `stateid` = '8' LIMIT 1
Ben phpmyadmin sorgu çalıştırdığınızda, bu hata işaretleme olmadan bilgi dönmek
EDIT: I apologize for not posting enough information; the following is the entire code block where the problem is
switch($lid){
case '460':
$tbl = $corporation_state_fee_tbl;
break;
case '535':
$tbl = $llc_state_fee_tbl;
break;
default:
return 0;
break;
}
var_dump("SELECT `".$processing."` AS fee FROM `".$tbl."` WHERE `stateid` = '".$state."' LIMIT 1");
$sql = mysql_query("SELECT `".$processing."` AS fee FROM `".$tbl."` WHERE `stateid` = '".$state."' LIMIT 1") or die(mysql_error());
$row = mysql_fetch_array($sql);
$fee = $row['fee'];
include(CONN_DIR."disconnect.php");
ve çıktısı:
string(83) "SELECT
standardAS fee FROMcorporation_state_feeWHEREstateid= '8' LIMIT 1" Unknown column '' in 'field list'