joymis Posted January 7, 2017 Share Posted January 7, 2017 Hi all,I have a data like this, dept_no under_dept level 01000 01000 0 01010 01000 1 03000 01000 1 03010 03000 2 03016 03010 3 03020 03000 2 03050 03000 2 03056 03050 3 91020 91020 1 now I have a var $x = 01000, then I should get all data row, when $x = 03000, then I should get dept_no like '03%' row when $x = 03010, then I should only get dept_no = 03010 and 03016 row does anyone have good idea can tell me how can I do? thanks Link to comment Share on other sites More sharing options...
davej Posted January 7, 2017 Share Posted January 7, 2017 Are you reading the data from a MySQL table? See the example below. You would modify it slightly so that a table is built... http://www.w3schools.com/php/php_mysql_select.asp Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now