Hello all,
I was wondering if someone out there can help me out with some sql code. I am wanting to create a query that will search all the posts in the post table and compare the titles to a variable (say $formtitle). If it finds a match it will return the threadid of the matching title; thier can only be one matching title in the post so the limit should be one.
I have this so far but it is not working
Code:
$formtitle= "$answer1 $answer2)
$prevpost = $DB_site->query_first("SELECT * FROM post WHERE post.title='$formtitle' LIMIT 1");
I was wondering would I have to use the string compare command for this to work