Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » How To » CONCAT ((SELECT ...),...) Error
Re: CONCAT ((SELECT ...),...) Error [message #1092 is a reply to message #1091] Sun, 09 September 2007 11:18 Go to previous messageGo to previous message
AJM is currently offline  AJM
Messages: 2354
Registered: April 2006
Location: Surrey, UK
Senior Member
The default SELECT statement created by Radicore should be as follows:
SELECT instruments.*
FROM instruments
LEFT JOIN instrument_models ON (instrument_models.instrument_model_id = instruments.instrument_model_id)

You need to extend this in your _cm_pre_getdata() method (as shown in http://www.tonymarston.net/php-mysql/infrastructure-faq.html #faq84) so that it becomes as follows:
SELECT instruments.*, CONCAT (instrument_type_name, ' - ',
                              instrument_model_manufacturer, ' ',
                              instrument_model_name) AS instrument_model
FROM instruments
LEFT JOIN instrument_models ON (instrument_models.instrument_model_id = instruments.instrument_model_id)
LEFT JOIN instrument_types ON (instrument_type.instrument_type_id = instrument_models.instrument_type_id)



 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: passwords
Next Topic: Restricting access to user's own record
Goto Forum:
  


Current Time: Sat Jul 27 20:32:33 EDT 2024

Total time taken to generate the page: 0.00793 seconds