|
|||||||
Join now to download all the free website templates or post on the forum. If you have never been on a forum before read the
FAQ. It's quick, easy and free to join!
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi,
am trying to query my database for specific words in variables. I have one database titled pranks with a column called prankentry and tags Another database holds an ID number and an entrytext column. I pass the ID number through the URL to /pranks/index.php?id=26. On index.php i am running a query to try and find similar items in the pranksentry row. Here's my code: $id = $_GET['id']; //GET ID $query = "SELECT entrytext FROM hmr WHERE id=$id"; //GET POST $result = mysql_query($query); while($row = mysql_fetch_array($result)) { $text = $row['entrytext']; //CHANGE VARIABLE } $sql = "SELECT * FROM pranks WHERE pranksentry LIKE '%$text%' ORDER BY id DESC"; //GET PRANKS SIMILAR to TEXT $result5 = mysql_query($sql); while($row = mysql_fetch_array($result5)) { $prank = $row['prankentry']; echo $prank; //OUTPUT Prank } It's very strange. By setting $text = 'test' and putting a prank into my that table with the text, 'testing to do this testing to do that'. The code above displays that line. However, if i set $text = "he talks too much, and never shuts up." and have a prank in my database with the text, 'shuts', it does not show the results i would like. Thanks & regards Lokananth Last edited by CovertPea; 08-04-2009 at 01:26 PM. |
|
|||
|
Search engine create their database by following links and indexing the content they find. They can not specifically search someone elses database unless there exists a link to the data. So the search engines ability to see the content is based on finding a link to the data. A quick rule of thumb is that when using a web browser, any page you can find by clicking links can be found by a search engine. Any page that can only be found by entering information via a keyboard is unlikely to be indexed.
Last edited by CovertPea; 08-07-2009 at 11:47 AM. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|