I have a form that seems to work OK. In settings it opens a handle to my tables with:
function settings(){
return array(
"dataSources"=>array(
"substantiator" => array(
"connectionString" => "mysql:host=mysql;dbname=substantiator",
"username" => "admin",
"password" => "sadfxxxx",
"charset" => "utf8"
),
)
);
}
And then in the setup() I do queries such as
$this->src('substantiator')
->query("SELECT bus_comp FROM business_components WHERE campaign='$campaign' AND email='$email'")
->pipe($this->dataStore("business_components"));
I have a need to return a single row from one of my tables so I can use two of the values as keys. Here is the query: $sql="SELECT email, campaign FROM employees where user='$userId');
Can I create a ->pipe to do this? If i do, how can I retrieve the email and the campaign fields from the SELECT? This will need to be done at the very top of setup() because many of the other queries depend on it.