|
Posted by sixstringsin on 01/14/08 18:22
##in the mysql query below, i am selecting a few fields from the masks
table:-
$mask_query = "SELECT mask_id, mask_name, mask_dynamic FROM masks
where mask_project = $project_id AND mask_parent = $phase_id";
##next i am storing the return value to a variable (on executing the
script, I donot get any mysql error so i assume the query ran fine:-
$mask_res = mysql_query($mask_query) or die("can't run query
[$mask_query]: ".mysql_error());
##now i intend to print the field called mask_name on the browser:-
$tc_array = mysql_fetch_array($mask_res, MYSQL_ASSOC);
$tc_name = $tc_array["mask_name"];
print "mask Name:".$tc_array['mask_name'] . " ";
##However, what is printed is the string mask Name, followed by a
blank. The mask_name field from the db is ##not retrieved. Where am i
going wrong? Appreciate any help!
Navigation:
[Reply to this message]
|