Jump to content

Joomla - pulling custom mysql table


elis

Recommended Posts

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 page on Joomla.

However, I've noticed Joomla's PHP commands for pulling tables is fairly...odd (at least to me)

 

Random bit of unrelated code to express what I'm talking about.

$query = "UPDATE #__polls"; $database->setQuery( $query );

 

However, when I try to set a typical code like

mysql_query("SELECT field FROM table") 
or die(mysql_error());  

 

It isn't working. (I can't duplicate the actual errors right now as I'm away from my home computer)

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?

???

Link to comment
https://forums.phpfreaks.com/topic/97002-joomla-pulling-custom-mysql-table/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.