Nothing in your code would produce an infinite loop, so most likely your query is not doing joins as you expect and is doing a cross-product type thing and creating "duplicate" records In particular, your query looks very suspect - you're using the lazy "from multiple tables" approach, instead of explicitly specifying join types, and you're using the members table twice ( FROM members and INNER JOIN members ). You don't specify a relationship between the original members table and the joined/aliased m one, so most likely you're doing a members * members cross-product fetch give that you seem to be fetching only an event name for your dropdown list, you can try eliminating the unused tables - ditch dates and results This will simplify things considerable, then (guessing) you can reduce the query to: SELECT event.Id, event. Eventname FROM event INNER JOIN sportevents ON event.
Id = sportevents. Event_id INNER JOIN members ON sportevents. Id = members.
Id INNER JOIN userlogins ON members.Id = userlogins. Id WHERE userlogins. Username = '$un I don't know if the members/userlogins join is necessary - it seems to just feed sportevents.Id through to members, but without knowing your DB's schema, I've tried to recreate your original query as best as possible.
Nothing in your code would produce an infinite loop, so most likely your query is not doing joins as you expect and is doing a cross-product type thing and creating "duplicate" records. In particular, your query looks very suspect - you're using the lazy "from multiple tables" approach, instead of explicitly specifying join types, and you're using the members table twice (FROM members ... and INNER JOIN members). You don't specify a relationship between the original members table and the joined/aliased m one, so most likely you're doing a members * members cross-product fetch.
Give that you seem to be fetching only an event name for your dropdown list, you can try eliminating the unused tables - ditch dates and results. This will simplify things considerable, then (guessing) you can reduce the query to: SELECT event.Id, event. Eventname FROM event INNER JOIN sportevents ON event.
Id = sportevents. Event_id INNER JOIN members ON sportevents. Id = members.
Id INNER JOIN userlogins ON members.Id = userlogins. Id WHERE userlogins. Username = '$un' I don't know if the members/userlogins join is necessary - it seems to just feed sportevents.Id through to members, but without knowing your DB's schema, I've tried to recreate your original query as best as possible.
I know it is complicated. I need to join members-id with loginuser-id. I see the join is causing the repeat.
The join ensures that the results is showed ONLY if the id field of the members table is the same as the id field of the userlogin – SebastianOpperman Sep 26 at 15:11 How would write the query otherwise while producing the same results? – SebastianOpperman Sep 26 at 15:14.
You could always try changing the SELECT statement to a SELECT DISTINCT statement. That'll prevent duplicates of the selected fields. Either that or reading all the results before displaying them, then de-duping them with something like array_unique().
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.