Jump to content

sortableTable nulls


fireupjb

Recommended Posts

Okay, trying to output in my addon a table that mimicks the base table HTML structure that WHMCS outputs; I see theres a sortableTable function , but every attempt I try fails... Any help?

 

use Illuminate\Database\Capsule\Manager as Capsule;

$query = "SELECT
whmcs.tbldomainpricing.extension AS TLD,
whmcs.tblpricing.msetupfee AS Selling_Price
FROM
whmcs.tbldomainpricing
INNER JOIN whmcs.tblpricing
 ON whmcs.tbldomainpricing.id = whmcs.tblpricing.relid
WHERE
whmcs.tblpricing.type = 'domainregister' 

ORDER BY
Selling_Price ASC";

$tabledata = "";
$result = full_query($query);

	while ($data = mysql_fetch_array($result, MYSQL_ASSOC)) {
		$TLD = $data['TLD'];
		$SELLING_PRICE = $data['Selling_Price'];
		$tabledata[] = array($TLD, $SELLING_PRICE);
	}
	echo $aInt->sortableTable(array('TLD', 'Selling_Price'), $tabledata);

 

I keep getting the infamous null error on sortabletable. Uncaught Error: Call to a member function sortableTable() on null

Link to comment
Share on other sites

Deprecated functionality

The current SQL Helper Functions are present in WHMCS 6.0 and above, but are now deprecated and may be removed in a later version of the product:

 

select_query()

update_query()

insert_query()

full_query()

 

Also mysql_fetch_array()

 

Check Interacting With The Database for Quering the database (you are using Capsule anyway)

Link to comment
Share on other sites

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.   Paste as plain text instead

  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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated