User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 426,807 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,825 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting

Need Help with converting an ID to a Name

Join Date: Jun 2007
Location: Valley Center, Kansas
Posts: 554
Reputation: kkeith29 is on a distinguished road 
Rep Power: 3
Solved Threads: 57
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Posting Pro

Re: Need Help with converting an ID to a Name

  #2  
Oct 7th, 2007
try this, it might work.

if( $rand_num <= $chance )
		{
			$item_id = mysql_query("SELECT `item` FROM `creatures` WHERE id = '$id_creature'");
			$foo =& creature_stats( item, $id_creature );
 
			$item_query = mysql_query("SELECT * FROM items WHERE id = '$foo'") or ('$item_query');
 
			$item = mysql_fetch_row($item_query);
 
			echo"You got an ".$item[0]."!";
 
		}
Reply With Quote  
All times are GMT -4. The time now is 7:46 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC