I am running a sql in PHP query that is dieing with the mysql_error() of
Unknown column '' in 'field list'
The query:
SELECT `standard` AS fee FROM `corporation_state_fee` WHERE `stateid` = '8' LIMIT 1
when I run the query in PHPmyadmin, it return the information without flagging the error
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");
and the output is :
string(83) "SELECT
standard
AS fee FROMcorporation_state_fee
WHEREstateid
= '8' LIMIT 1" Unknown column '' in 'field list'