I know this is extremely simple, I just need two tables to link within my mysql database.
I have joomla virtumart
vt1_vm_orders (table)
and
vt1_chronoforms_squarefril (table)
correct me if i am wrong but i just want for instance if you think this will work
cf_id within vt1_chronoforms_squarefril (table) that is auto inc
and
order_id within vt1_vm_orders (table) that is auto inc
so my site will display information if they are the same id, I know the below is wrong hence why i am posting here.
my wrong code:
$db_temp = new ps_DB;
$q = "SELECT date_9, cf_id, order_id";
$q = "FROM vt1_chronoforms_squarefrill, vt1_vm_orders";
$q = "WHERE vt1_chronoforms_squarefrill.cf_id = vt1_vm_orders.order_id)";
$db_temp->query($q);
$db_temp->next_record();
$myInfo = $db_temp->f("date_9");
$body = str_replace( "[DATE_9]", $myInfo, $body);