BACK from the dead (AGAIN!).
After starting this thread I tried to get this to work with jpadie's method, but I couldn't quite get it.
Well I have a new project I would like to definitely use this on. So perhaps Jpadie or somebody else could explain the last post for me.
So I query by date...
append CREATE [TEMPORARY] TABLE mytablename select threadid
, MIN(messages.date_added) as min_date
, MAX(messages.date_added) as last_message
, COUNT(*) as num_messages
from messages
group
by threadID
Like that? Then in another...
r937,
Could you perhaps give me an example of storing that into a table. Would that be a temporary table, or would it forever exist? (Obviously I've never done this before).
Thanks so much r937, I owe you so much.
Thanks for the reply,
I forgot to mention that I am on MySQL 3.23, so I can't utilize subqueries. I take it there is no other way to do this?
Also, I could easily upgrade to MySQL 4.1+, but is there *any* chance that doing so would break some of my current queries? (I can't afford that right...
I think I shot myself in the foot by not normalizing my forum schema. Here is what my table for forum posts looks like:
messageID (unique, auto increment)
threadID
groupID (index)
userID
subject
body
date_added
first_post (yes or no)
So for a specific Group/Forum page, I am trying to get a...
So to output a particular thread, I would need to do one giant query ordered by date, then run a query for every single post checking if there are any posts with the same ID in the reply field?
Is there another way? Isn't embedding a select inside a loop a bit dirty?
I see your point. Tags are used to describe a wide array of user submitted articles. Over time a user's tagset will start to fill with tags as they view more articles. Duplication of certain tags (after normalizing for tags that are more likely than others) means that a user is more interested...
Yes, I see exactly what you mean vacunita, but my statement in post #3 is incorrect because of what I mentioned in my last post. Over time all users will asymptotically approach 100% matches due to the nature of "tagging" for categorization.
I apologize for not telling you to disregard that...
My last post was referring to jpadie,
vacunita, your last post would neglect multiple tag matches, which are going to be key in detecting patterns of what people like. But I think the biggest problem with that approach is that for any given subject there is going to be a finite set of possible...
I originally had the same function and resulting array, but I run into a problem of placing meaning to this. If I sum up the matches, then divide by the total possible matches to normalize (count(array1)*count(array2)) I have a hard time with interpretation.
For instance if one array has 1000...
I didn't say what the output array should look like because I am not sure.
The problem with your suggested output array is that if I try to sum it and then normalize by the total possible matches I end up with less than a 50% match between the two arrays. But array2 has 100% of its tags...
I have two arrays like the following:
$array1 = array("red", "red", "blue", "green", "blue");
$array2 = array("blue", "blue", "red", "red");
I want to count all of the matches between the two arrays; however, (counting) array_intersect does not work because each array has duplicates (which I...
I would like to be able to download a flash video file that I have uploaded to a site (i.e. youtube, google video). I parse the page and can create the actual file url (i.e.: http://youtube.com/player2.swf?video_id=phxIJoW330Y&l=165&t=OEgsToPDskIJNrC6JwNoaCzpBXyYqPZe)
However, I am uncertain as...
I have a list (<ul></ul>) that has some <span> tags in it.
I would like to use DHTML to dynamically style this list based on different user selections through a form.
On an onBlur of a field I want to change the color of *all spans* contained in <ul></ul>.
Say <ul> has id="my_list" so I...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.