Quote:
Originally Posted by bharanidharanit
Hi this works for what i asked? Is this correct?
Code:
SELECT u.username,a.avatarid,a.avatarext
FROM users u,avatar a
WHERE u.id
IN(
SELECT friendid
FROM friend
WHERE userid='$loggeduserid'
AND accepted='0')
AND u.id=a.userid;";
|
why don't
you try it out, rather than ask a 'does this work question'
after all its
your project,
you know what
you are looking for, and assuming you have structured your test data in such a way
you should be able to work out if it meets
your requirements
part of this process in my books is for
you to work out how to use the tools available to you to improve your development and debugging skills
incidentally I still think your table design is wrong
you also need to have so test data which meets the test you are trying to sign off, and perhaps just as importantly some data which doesn't. the reason so you know the code works
so you need some test data for a person which meets the criteria
some which doesn't
some which may partially meet the criteria (especially important if you are joining more than 2 tables)
you need to ensure that you are extracting the data required from the tables, all of the relevant data, and only that data