Jump to content

mySQL query help


Stephen68

Recommended Posts

This is the query that I'm trying to run but not getting what I'm looking for.

The ($) values are of course values that I garbed from the submitted form with PHP.

I ran an echo on the query code and the query is getting the values put in it, just not the results I wanted ;(

 

 

$query  = "select * from tech where type='$type' heading like \"%$trimmed%\" OR content  like \"%$trimmed%\" order by heading LIMIT $offset, $rowsPerPage";

 

 

What I'm trying to do is find all the words that match the submitted word in the fields content and heading but only from where type equals a certain value.

I hope I'm explaining this right, sure sounds confusing.

 

Any Help would be great!

 

Stephen

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.