help please!!!!!!???

From: Date: Tue, 09 Jan 2001 20:56:14 +0000
Subject: help please!!!!!!???
Groups: php.general 
Request: Send a blank email to php-general+get-33539@lists.php.net to get a copy of this message
Hi everyone, Could anyone help me on my codes, I would like to have a function which could generate the similar variables and queries, how could I produce the variable by calling the function? I need a function will generate those codes when each time it was called. I hope you guys could understand what my problem is. Thank you very much for any helps. $query1=@mysql_query("select FKMotherEventType_ID from $table where EventType_ID='$ETpk'",$db); $row1=@mysql_fetch_array($query1); $FKMET1=$row1["FKMotherEventType_ID"]; if ($FKMET1){ $query2=@mysql_query("select FKMotherEventType_ID from $table where EventType_ID='$FKMET1'",$db); $row2=@mysql_fetch_array($query2); $FKMET2=$row2["FKMotherEventType_ID"]; if ($FKMET2){ $query3=@mysql_query("select FKMotherEventType_ID from EventType where EventType_ID='$FKMET2'",$db); $row3=@mysql_fetch_array($query3); $FKMET3=$row3["FKMotherEventType_ID"]; if ($FKMET3) { $query4=@mysql_query("select FKMotherEventType_ID from $table where EventType_ID='$FKMET3'",$db); $row4=@mysql_fetch_array($query4); $FKMET4=$row4["FKMotherEventType_ID"]; if ($FKMET4) { echo "<td bgcolor=" .$bgcolor. "> <font size=" .$rsfontsize. ">4 &nbsp&nbsp&nbsp &nbsp&nbsp&nbsp &nbsp&nbsp&nbsp <a href=tbl_ProjSchedule2.php target=_self> " .$data. " </font></td>\n"; } } } } Calvin Chua

« previous php.general (#33539) next »