Spudinski Posted August 19, 2012 Share Posted August 19, 2012 This is a small test I have created, with use of other tests around the net. This one will specifically attain to solving real-world problems that developers face each day. Furthermore, I'm trying to keep the tasks as simple as possible - so, don't post answers, if you would like to have your answer reviewed PM me. Task 1 Given a database, and two tables called "skills" and "user" . "skills" holds three columns, "id", "label" and "value". "user" holds four columns, "id", "name", "email" "skill_ref". Now, write a MySQL query to retrieve the user's "name" with the third highest skill number("value") for the skill with a "label" of "agility". No PHP is required. Task 2 Given an array, with an undetermined set of elements which could be an array themselves, holding only integer values: Create a function called findMin($int_arr), that will find the smallest integer throughout the 2-dimentional array. Sample input: $int_arr = array(4,90,array(7,3),4); Output should be: 3 Feel free to ask questions and discuss. Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted August 20, 2012 Share Posted August 20, 2012 Nice little tasks, thanks spudinski for the sharing. My solutions sent in PM. Quote Link to comment Share on other sites More sharing options...
Spudinski Posted August 20, 2012 Author Share Posted August 20, 2012 DJK solved the second task. a_b has solved both tasks. Quote Link to comment Share on other sites More sharing options...
Djkanna Posted August 20, 2012 Share Posted August 20, 2012 DJK solved the second task. a_b has solved both tasks. DJK will solve the first task too, when DJK isn't being a lazy bugger. >.< Quote Link to comment Share on other sites More sharing options...
Spudinski Posted August 20, 2012 Author Share Posted August 20, 2012 C'mon Dj, it's a few lines of sql to build the structure. :P 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.