1.5 Pulling Custom Table
Posted: Wed Mar 19, 2008 11:16 pm
I'm an amateur when it comes to Joomla, so please bear with me.
I'm trying to select a field from a custom table I made in Mysql through a module.
However, I've noticed Joomla's PHP commands for pulling tables is fairly...odd (at least to me)
When I try to set a typical code like the below, it (obviously) doesn't work.
I can only assume it's because of how Joomla's set up to operate. I've spent the past four hours on Joomla's site trying to figure this out and I'm ready to slam my head into the keyboard.
I realize that Joomla has designated tables so they appear as "#__table", and have tried searching through the code to find where this is being set but haven't found it, yet.
Can someone explain what it is I'm not understanding or how to select a custom table through a Joomla module?
I'm sorry if my question is on the dumb side, or if this has been addressed before (I did search for a similar question, but didn't find one). Any help would be greatly appreciated. Again, I'm new to Joomla - so please keep answers on the "an idiot could understand this" side.
I'm trying to select a field from a custom table I made in Mysql through a module.
However, I've noticed Joomla's PHP commands for pulling tables is fairly...odd (at least to me)
When I try to set a typical code like the below, it (obviously) doesn't work.
Code: Select all
mysql_query("SELECT field FROM table")
or die(mysql_error());
I realize that Joomla has designated tables so they appear as "#__table", and have tried searching through the code to find where this is being set but haven't found it, yet.
Can someone explain what it is I'm not understanding or how to select a custom table through a Joomla module?
I'm sorry if my question is on the dumb side, or if this has been addressed before (I did search for a similar question, but didn't find one). Any help would be greatly appreciated. Again, I'm new to Joomla - so please keep answers on the "an idiot could understand this" side.