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 ? Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.