Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.