ebchost Posted December 14, 2011 Share Posted December 14, 2011 $faktura_u_s = mysql_query(" SELECT `tbl_roba_stanje`.`cena`-((`tbl_roba_stanje`.`cena`/100)*`tbl_roba_stanje`.`rabat_proc`) as `cena_bez`, `tbl_roba_stanje`.`ulaz`, (`cena_bez` * `tbl_roba_stanje`.`ulaz` ) AS `osnovica` FROM `tbl_roba`,`tbl_roba_stanje` WHERE `tbl_roba`.`id` = `tbl_roba_stanje`.`roba_id` AND `tbl_roba_stanje`.`dokument_id` = '$dokument'") or die(mysql_error()); and error is " Unknown column 'cena_bez' in 'field list' " Problem is ? Link to comment https://forums.phpfreaks.com/topic/253150-unknown-column-cena_bez-in-field-list/ Share on other sites More sharing options...
marcelobm Posted December 14, 2011 Share Posted December 14, 2011 You can only use column aliases in GROUP BY, ORDER BY, or HAVING clauses Link to comment https://forums.phpfreaks.com/topic/253150-unknown-column-cena_bez-in-field-list/#findComment-1297814 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.