Good morning all,
I'd appreciate your guidance on this issue, i currently have a website in which people are allowed to post anything they want regarding certain topics. I use php to output the information from my mysql database onto the main page of site.
From there i display a link, bringing the user to another page, while passing the ID of the original post through the URL. On this new page i'd like to compare , every word of the original post (which i can put into a variable by querying the database for that ID number) to every word of another paragraph, from another table in my database. If it finds some sort of similarity's between the two, to print out the paragraph from the second table.
I originally coded this using the mysql LIKE while incorporating the use of % and _, until i realized this was comparing the entire string to the entire string, with wild-cards on the end.
From there i managed to explode the original post but am just giving my headache trying to figure out how to compare each word of the 1st post, to every word in the 2nd post.
Any help is greatly appreciated, Thanks!
I'd appreciate your guidance on this issue, i currently have a website in which people are allowed to post anything they want regarding certain topics. I use php to output the information from my mysql database onto the main page of site.
From there i display a link, bringing the user to another page, while passing the ID of the original post through the URL. On this new page i'd like to compare , every word of the original post (which i can put into a variable by querying the database for that ID number) to every word of another paragraph, from another table in my database. If it finds some sort of similarity's between the two, to print out the paragraph from the second table.
I originally coded this using the mysql LIKE while incorporating the use of % and _, until i realized this was comparing the entire string to the entire string, with wild-cards on the end.
From there i managed to explode the original post but am just giving my headache trying to figure out how to compare each word of the 1st post, to every word in the 2nd post.
Any help is greatly appreciated, Thanks!