concat error in query builder
It does not seem that Query Builder accepts CONCAT !? I get an error when query builder is loaded with my query containing a working query with CONCAT.
It does not seem that Query Builder accepts CONCAT !? I get an error when query builder is loaded with my query containing a working query with CONCAT.
What is the query? What is the error? I can look into it.
Here comes the code that works:
<?php
$WADAstore_details = new WA_MySQLi_RS("WADAstore_details",$DB,1);
$WADAstore_details->setQuery("SELECT store_id, storename, description, picture, link, rating, CONCAT (`employee`.`firstName`,' ',`employee`.`lastName`) AS employee_name, `district`.`districtName` AS district_districtName, city.cityName AS city_cityName, `manufacture`.`manufactureName` AS manufacture_manufactureName, city2.cityName AS city_cityName2, `category`.`categoryName` AS category_categoryName, other FROM store LEFT JOIN employee ON employee.employee_id = store.idEmployee_id LEFT JOIN district ON district.district_id = store.idDistrict_id LEFT JOIN city ON city.city_id = store.idDistrictCity_id LEFT JOIN manufacture ON manufacture.manufacture_id = store.idManufacture_id LEFT JOIN city AS city2 ON city2.city_id = store.idManufactureCity_id LEFT JOIN category ON category.category_id = store.idCategory_id WHERE store_id = ?");
$WADAstore_details->bindParam("i", "".($_GET['store_id']) ."", "-1"); //Paramstore_id
$WADAstore_details->execute();
?>
And here is the error when I open it in Query builder:
"Error Inspecting SQL
• table alias not found CONCAT (`employee`
• select column not found: ' '
• checked column not found: lastName)"
It appears the query builder does not work with CONCAT() statements currently. I'll log this as a bug and try to get it fixed in a future release.
I'm currently on vacation. I'll be answering forum posts and doing critical updates, but probably won't add concatenation support until my return. Look for an update in December.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.