Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Technical Support » Other » PHP issue
Re: PHP issue [message #439799 is a reply to message #438943] Sat, 20 November 2010 13:51 Go to previous messageGo to previous message
cnc95fan is currently offline  cnc95fan
Messages: 1261
Registered: July 2007
Karma:
General (1 Star)
I have yet another really weird issue, I've tried rewriting this thing about 4 times.
Basically, inside a DB there is for arguments sake, 3 tables.
The first table is an index, which contains 2 columns, id (as in some id in the URL) and a name.
The page is supposed to select from the index where $_GET['id'] is equal to id in the index, then look up the name in the same row. After getting the name it is then supposed to add on a postfix (such as x or y, so where the name would be renegade, the variable I assigned to the next task would be renegadex).
$pid = $_GET['id'];
$index = mysql_query("SELECT * FROM index where id = '".$pid."'") or die(mysql_error());
$row = mysql_fetch_array($index);
$thisvar = $row['name'];
$x = "x";
$query = mysql_query("SELECT * FROM ".$thisvar . $x." where uid = '".$_SESSION['id']."'") or die(mysql_error());
$row1 = mysql_fetch_array($query); 
$uid = $row1['id'];
echo $uid;

The echo returns nothing so I'm assuming that one of the mysql_querys is failing somewhere...
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: GameSpy
Next Topic: Generals... AGAIN
Goto Forum:
  


Current Time: Fri Nov 22 19:56:45 MST 2024

Total time taken to generate the page: 0.01064 seconds