suttercain Posted October 23, 2008 Share Posted October 23, 2008 Hi everyone, I currently am running the following select statement: SELECT * FROM device INNER JOIN device_eo ON ( device.device_id = device_eo.device_id ) INNER JOIN eo ON ( device_eo.executive_order = eo.executive_order ) INNER JOIN eo_engine_family ON ( eo.executive_order = eo_engine_family.executive_order ) INNER JOIN engine_family ON ( eo_engine_family.engine_family_name = engine_family.engine_family_name ) WHERE eo.executive_order LIKE '%".$r."%' But I am not getting the results I seek. The executive order appears in a string format that is in the following format: DE-05-01 DE-05-001-01 DE-05-001-02 DE-06-001 DE-06-001-01 DE-06-001-02 If I do a search for DE-06-001-01 I would like these results returned: DE-06-001 DE-06-001-01 DE-06-001-02 As it currentley stands I would only output DE-06-001-01 What am I doing wrong here? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Barand Posted October 23, 2008 Share Posted October 23, 2008 use ... LIKE 'DE-06-001%' Quote Link to comment Share on other sites More sharing options...
suttercain Posted October 25, 2008 Author Share Posted October 25, 2008 Thanks Barand. I'll give it a go on Monday when I'm back in the office. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.