View Single Post
  #3  
Old 05-04-2017, 06:13 PM
aquapyrofan aquapyrofan is offline
Member
 
Join Date: Apr 2017
Posts: 48
Gender: Unknown/Other
Credits: 10,874
aquapyrofan is on a distinguished road
Default

Quote:
Originally Posted by Dinocanid View Post
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)
Is this how I'd use the owned_adoptables "type" value to call a value in adoptables? I'm confused because it doesn't seem like it.
Reply With Quote