View Single Post
Old 01-31-2007, 11:46 AM  
amateurcanada
Confirmed User
 
amateurcanada's Avatar
 
Industry Role:
Join Date: Jul 2001
Posts: 3,766
php help, real easy, for free porn! :D lol

Help me and i'll toss ya a membership haha ;)


I am trying to setup a table where i have it as a template and one with all my data. id like to load some fields from table one, and have them displayed from templates made in table 2. below is an example, however it doesnt seem to parse the variables pulled from the database when its encoded into another template.. below is my example - the field is set to text, also tried longtext






$DBLINK = mysql_connect($DBHOST, $DBLOGIN, $DBPASSWORD);
mysql_select_db($DBNAME, $DBLINK);

$result = mysql_query("SELECT * FROM galleries WHERE ID = $gid",$DBLINK);

if ($myrow = mysql_fetch_array($result)) {

do {



$result2 = mysql_query("SELECT * FROM templates WHERE ID = 1",$DBLINK);

if ($mytemplate = mysql_fetch_array($result2)) {
do {
echo $myrow["modelname"], $myrow["modeldir"], $mytemplate["format"];
} while ($mytemplate = mysql_fetch_array($result2));
} else {
echo "Sorry, no templates were found!";
}

} while ($myrow = mysql_fetch_array($result));
} else {
echo "Sorry, no records were found!";
}
?>
__________________

be our partner - join nichepartners today
will.assum.producer @ AmateurCanada.com / icq: 30146166 / facebook.com/will.assum / #amateurcanada
amateurcanada is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook