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
https://forums.phpfreaks.com/topic/85522-mysql-query-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.