MySQL Forums
Forum List  »  General

User Variables transfered from 1 page to another?!?!??! HELP!
Posted by: Matt Wegrzyn
Date: April 07, 2005 05:48PM

Hello,

I am working with MySQL user variables, and some really strange stuff is happening. The user variables from my last connection are being transfered from one page to another. How is this possible? Here is my query:

<!-- #url.f# is like $f in php which is the value of the URL variable "f" -->

SELECT @var_parent_id := parent_id, forum_name
FROM forums
WHERE forum_id = '#url.f#' OR forum_id = @var_parent_id
ORDER BY parent_id ASC

Basically, what I am trying to do is get the category of the forum in the same query, which is actually working! What I do is I SELECT the row which matches the value of the URL "f" variable, then in that same query, I take the category_id from that row and add it to the WHERE clause to get the category data as well.

This works great, but for some reason, when I go to this page:

/forum.cfm?f=10 --> It works good, retrieves data for forum 10 and its category.

Then when I go to /forum.cfm?f=1 --> It works good, and since f=1 is the category itself, it retrieves only data for the category, since a category doesn't have a category.

BUT, then when I go back to /forum.cfm?f=10 and refresh, I still see the same info that I had for the last page f=1. Then I have to refresh twice to receive the currect info!

What is going on? Why is it doing that?

Options: ReplyQuote


Subject
Written By
Posted
User Variables transfered from 1 page to another?!?!??! HELP!
April 07, 2005 05:48PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.