Welcome Guest, Not a member yet? Register   Sign In
Simple database code not working ( Problem ongoing )
#8

[eluser]mdowns[/eluser]
If you join the pm_thread and pm_recipient table on pm_id, you get all the threads for each recipient:

SELECT T.* FROM pm_thread AS T JOIN pm_recipient AS R WHERE T.pm_id = R.pm_id

Then you filter out the recipients based on your given userid:

AND R.pm_recipient = @userid


Messages In This Thread
Simple database code not working ( Problem ongoing ) - by El Forum - 08-27-2008, 09:20 AM
Simple database code not working ( Problem ongoing ) - by El Forum - 08-27-2008, 10:11 AM
Simple database code not working ( Problem ongoing ) - by El Forum - 08-27-2008, 10:14 AM
Simple database code not working ( Problem ongoing ) - by El Forum - 08-27-2008, 12:05 PM
Simple database code not working ( Problem ongoing ) - by El Forum - 08-28-2008, 09:56 AM
Simple database code not working ( Problem ongoing ) - by El Forum - 08-28-2008, 10:04 AM
Simple database code not working ( Problem ongoing ) - by El Forum - 08-28-2008, 10:10 AM
Simple database code not working ( Problem ongoing ) - by El Forum - 08-28-2008, 10:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB