Last active
August 29, 2015 14:12
-
-
Save ziyahan/c91c66cccc640dc89484 to your computer and use it in GitHub Desktop.
Sql Query Builder Class for PHP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$this->sqlquerybuilder->select(array( | |
"project.id", | |
"company.explanation AS companyName", | |
"project.projectCode", | |
"project.projectName" | |
)) | |
->from("c_project project") | |
->join("left", "p_company company", array("company.id=cariNo")) | |
->join("left", "p_projectStatus projectStatus", array("projectStatus.id=project.projectStatus")) | |
->join("left", "c_users technicPersonal", array("project.projectTechnicAuthorized=technicPersonal.usrId")) | |
->join("left", "c_users salesPersonal", array("project.projectSaleAuthorized=salesPersonal.usrId")) | |
->join("left", "p_projectTechnicStatus projectTechnicStatus", array("projectTechnicStatus.id=project.projectTechnicalStatus")); | |
->where(array( | |
array("column"=>"deleted","operator"=>"=","value"=>0), | |
array("column"=>"createUserId","operator"=>"=","value"=>1), | |
array("column"=>"projectEndDate","operator"=>"<=","value"=>"2014-12-31"), | |
)) | |
->build(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment