Jump to content

Multiple table interaction


lucianozanita

Recommended Posts

Hello, I'm in a dilemma actually an impasse, I'm trying to assemble a query in the database with the new database interaction base WHMCS has developed, but I can not find an easy way to do a multiple query on two tables .

Using their example, I would also like to select three customfield fields from the currently listed account.

Since they are customfield1, customfield2, customfield3, but I have no idea how I can be using the query to do this, would anyone know how to do the same?

 

Here is an example used at this point that only lists the accounts, and needed to list the customfield value of the currently listed account.

 

 

foreach (Capsule::table('tblclients')->get() as $clientes) {

$primeironome = $clientes->firstname . PHP_EOL;

$segundonome = $clientes->lastname . PHP_EOL;

}

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