View Single Post
  #4  
Old 04-08-2007, 09:36 AM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
I suggest using public functions
Inside of the database create a public function like so

PHP Code:
public function getItemData(itemID)
  return 
this.("item_"temp.itemID); 
You could call this like

PHP Code:
temp.itemInfo = ("my Database").getItemData(itemID); 
If you wanted, you could do this.
Inside of the database, add this

PHP Code:
function onCreated()
  
itemData this;
//Other code 
You could then call it like

PHP Code:
temp.itemInfo itemData.getItemData(itemID); 
Which ever you find easier to understand, if you are to use the bottom one, make sure you remember what you call these though. Keep a document or a weapon explaining what each one does, so you don't get lost or reuse the same name.
Reply With Quote