Jump to content

php page taking time to load a register


jkkenzie

Recommended Posts

hi! i dont know if the query below from mysql is slowing down the page or i have not written it properly:

It is very slow, even when you limit the results to 100 . Thanks in advance..

SELECT  `tbl_business`.`appformno`, " _
            & "`tbl_business`.`pobox`, `tbl_business`.`plotno`, `tbl_business`.`postalcode`, " _
            & "`tbl_business`.`zonecode`, `tbl_business`.`ne`, `tbl_activities`.`act_code`, " _
            & "`tbl_activity_codes`.`approved_fee`, `tbl_payment_status`.`status`, " _
            & "`tbl_business`.`company`, `tbl_activity_codes`.`description` " _
            & "FROM (`citycouncil`.`tbl_activity_codes` `tbl_activity_codes` " _
            & "LEFT JOIN (`citycouncil`.`tbl_business` `tbl_business` " _
            & "LEFT JOIN `citycouncil`.`tbl_activities` `tbl_activities` " _
            & "ON `tbl_business`.`appformno`=`tbl_activities`.`appformno`) " _
            & "ON `tbl_activity_codes`.`act_code`=`tbl_activities`.`act_code`) " _
            & "LEFT JOIN `citycouncil`.`tbl_payment_status` `tbl_payment_status` " _
            & "ON `tbl_activities`.`id`=`tbl_payment_status`.`activity_id` " _
            & "WHERE tbl_business.appformno LIKE '%" & strFormNo & "%' " _
            & "AND tbl_business.bid LIKE '%" & strBizIdNo & "%'" _
            & " AND `tbl_business`.`contperson` LIKE '%" & strContPerson & "%' " _
            & "AND `tbl_business`.`zonecode` LIKE '%" & strZoneCode & "%' " _
            & " AND `tbl_activities`.`act_code` LIKE '%" & strBizActCode & "%' " _
            & "AND `tbl_business`.`roadstreet` LIKE '%" & strStreet & "%' " _
            & " AND `tbl_business`.`company` LIKE '%" & strBizName & "%' " _
            & "AND `tbl_business`.`building` LIKE '%" & strBuilding & "%' " _
            & "ORDER BY `tbl_business`.`appformno`

Link to comment
https://forums.phpfreaks.com/topic/257743-php-page-taking-time-to-load-a-register/
Share on other sites

sql: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.`pobox`, `tbl_business`.`plotno`, `tbl_business`.`postalcode`, " _

            ' at line 1

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.