Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by letimati

  1. letimati

    tree navigation

    Hi there i have a tree structure navigation for a web site i am building, each page has an id, a parent_id and name. i am looking for a way given one name that i can get the tree to the root page. a simple excample will help me explane better. page table id | parent_id | name 1...
  2. letimati

    Cleaning up my database

    Hi I am taking over a simple website database that has pages. Each page has a parent_id. I have just looked at the database table and it has thousands of entrys. I looked into it a little and basically when a page was being deleted its children were not getting deleted. I would like to clean...
  3. letimati

    Previous / Next for alphabetical order

    Would it be difficult to return the id's rather than the names?
  4. letimati

    Previous / Next for alphabetical order

    Thanks so much i would never have know how to do this. can anyone recommended a good sql book to get into learning this kind of stuff?
  5. letimati

    Previous / Next for alphabetical order

    Hi I would like to get the next and previous records when i am ordering alphabetically. So i have the following id name 1 john 2 simon 3 luke I am on the record luke and i want to get the next one and the previous one in alphabetical order. So my sql query would give me back...
  6. letimati

    syntax error

    Sorry I just checked its the line above this that was giving the error, sorry for wasting your time
  7. letimati

    syntax error

    Hi i am getting a syntax error from this can anyone tell me where i am going wrong. Thanks in advance. syntax error var regexS = "[\\?&]"+name+"=([^&#]*)";
  8. letimati

    Search on multiple fields.

    PLEASE IGNORE THE ABOVE POST I HAVE NAILED IT SELECT c.content_general AS headline, c2.content_general AS body FROM news n INNER JOIN content_english c ON c.id = n.headline INNER JOIN content_english c1 ON c1.id = n.body WHERE n.id =7
  9. letimati

    Search on multiple fields.

    Hi i am back again as i have been thinking about the way i do my search and i think it would be better for me to get the content_general entry from this query rather than getting the ids. However this would mean i would have to get entries from more than one row in the content_english table. So...
  10. letimati

    Search on multiple fields.

    I did it like this and thought i should post it here anyway. SELECT n. * FROM news n, author a INNER JOIN content_english c ON c.id IN (n.headline, n.body) AND (c.content_general LIKE '%test%' OR n.author LIKE '%test%') AND n.live =1 AND n.author = a.id I imagine there is a more elegent way of...
  11. letimati

    Search on multiple fields.

    Hi How is everyone today? I have to add another bit onto this query yous helped me with. I now have to check the author is in my author table so SELECT n. * FROM news n INNER JOIN content_english c ON c.id IN (n.headline, n.body) AND (c.content_general LIKE '%test%' OR n.author LIKE '%test%')...
  12. letimati

    format search results.

    I would like that to be matched as well. I have done something like this so far $noTags = strip_tags($text); $withEm = str_replace($_GET['sq'], '<em>'.$_GET['sq'].'</em>', $noTags); print '<p>'.substr($withEm, 0 , 100).'...</p>'; $pos = strrpos($withEm, $_GET['sq']); if (!($pos === false)){...
  13. letimati

    format search results.

    Hi I want to format the way I output search results by showing the string query inside <em></em> tags and cut it so shows this in the middle of 20 characters. So if i have $text = "this is the test text i have but i dont want to output it all so just want to output the important part of the...
  14. letimati

    Search on multiple fields.

    Great this works perfect.
  15. letimati

    Search on multiple fields.

    Ok again before i start thanks for the help. I have changed it slightly to deal with another field 'author' that is not in the content table. SELECT n. * FROM news n INNER JOIN content_english c ON c.id IN ( n.headline, n.body ) AND c.content_general LIKE '%test%' AND n.live =1 OR ( n.author...

Part and Inventory Search

Back
Top