Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
bjstyl2
Starting Member
12 Posts |
Posted - 2009-10-01 : 14:44:09
|
The shortened version of my script is:<?php session_start(); include("config/admin-includes.php"); $con=new DBConnection(host,user,pass,db); $conObj=$con->connectDB(); //first of all unset these variables unset($_SESSION['report_header']); unset($_SESSION['report_values']); //note that the header contain the three columns and its a array $qry=mysql_query("SELECT * FROM race WHERE id='".$_REQUEST['rid']."'"); $rs_race=mysql_fetch_object($qry); $_SESSION['report_header']=array("Race Name","First Name","Last Name","Address","Apt","City","State","Zip Code","Gender","Telephone","Birthdate","Age on Race Day","Email","Category"); ................... // now the excel data field should be two dimentational array with three column $qry_user=mysql_query("SELECT * FROM racer WHERE race_id='".$_REQUEST['rid']."'") or die("SELECT * FROM racer WHERE race_id='".$_REQUEST['rid']."'"); $i=0; while($rs_user=mysql_fetch_object($qry_user)) { $_SESSION['report_values'][$i][0]=$rs_race->name." "; $_SESSION['report_values'][$i][1]=$rs_user->fname." "; $_SESSION['report_values'][$i][13]=$rs_user->category." ";SOOOOOOO....The category session field is returning the ID from the USER database. The name of the category resides in the RACE database. Does anyone know a quick and easy way for me to get the value name to show up instead of the category ID??Any help is greatly appreciated.I ha |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-10-01 : 15:03:18
|
This is not a MySQL-Forum.Have a look at dbforums.com No, you're never too old to Yak'n'Roll if you're too young to die. |
|
|
|
|
|
|
|