View Single Post
  #2  
Old 05-04-2017, 05:35 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 89,021
Dinocanid is on a distinguished road
Default

To call data from the adoptables table (or any table), you would just use a line of code likes this:

HTML Code:
$mysidia->db->select("adoptable", array("Column"), "Row = '$somevalue'")->fetchColumn();
With "adoptable" being the table name. It is case-sensitive though, so it must be exactly how it is typed in phpMyAdmin. Just change adoptable to owned_adoptables if you want that table.

If you're trying to define a variable or something, it would look like this:
HTML Code:
$trait = $mysidia->db->select("adoptable", array("Column"), "Row = '$somevalue'")->fetchColumn();
Then you can just use $trait to call it in the php file whenever you need it, instead of calling the table every time. (replacing trait with whatever you would call it of course)
__________________
Reply With Quote