You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Alternative to direct SQL in CP3?

Received Response
5
Views
2
Comments
edited Jul 2, 2018 7:39AM in Customer Portal 2 comments

Content

A portal that I'm currently migrating to CP3 has one of the following SQL statements in one of its models:

$sql = "SELECT hm.id, l.label 
                FROM visibility v, hier_menus hm
                LEFT JOIN labels l ON (l.label_id = hm.id AND l.tbl=" .TBL_HM. " AND l.fld=1) 
                LEFT JOIN labels l2 ON (l2.label_id = hm.id AND l2.tbl=" .TBL_HM. " AND l2.fld=2) 
              

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!