I have the following MySQL query:
SELECT *
FROM customer
WHERE
fName LIKE '%#attributes.q#%' AND deleted = 'N'
OR
lName LIKE '%#attributes.q#%' AND deleted = 'N'
This works fine for guesses, but if you provide an exact match: "Bill Clinton" fname=bill lname = clinton to the query above you get 0 results? where bill clint gives...
I'm working on a search feature for my application, I want to search all articles in the database. As of now, I'm using a LIKE in my queries, but I want to add a "Related Articles" feature, sort of like what SO has in the sidebar (which I see as a problem if I use Like).
What's better to use for MySQL searching, Fulltext or Like... or a...
is there anyway to speed up mysql like operator performance if wild card is involved? eg. like '%test%'
...
I want to make this kind of query:
create procedure something
@name varchar(13)
as
begin
select *
from WORKER
where NAME LIKE "%@name%"
end
For input @name=ho, I want output every row that contains NAME wich sounds "ho",
for example HOuse, soHO, broHOw...
...
The code we're using is straight-forward in this part of the search query:
myCriteria.Add(
Expression.InsensitiveLike("Code", itemCode, MatchMode.Anywhere));
and this works fine in a production environment.
The issue is that one of our clients has item codes that contain % symbols which this query needs to match. The resulting SQL...
The Set up
This is more or less a follow up question to something I had previously posted regarding comma separated values (explode,implode). Here's the scenario which has been stomping me the last few days as I'm a noob--sorry for the lengthy post.
I'm passing a variable via the url (index.php?id=variable), I then check the database t...
I have mysql table that has a column that stores xml as a string. I need to find all tuples where the xml column contains a given string of 6 characters. Nothing else matters--all I need to know is if this 6 character string is there or not.
So it probably doesn't matter that the text is formatted as xml.
Question: how can I search wi...
Hello, actually i use this method to show similar words for a search request..
$query = "SELECT * FROM searches WHERE Query LIKE '%$search%' ORDER BY Query";
if someone searches for "nelly" it looks up in the database for similar words
"nelly furtado, nelly ft. kelly"...
but i dont want to show up the searched word..
example: yo...
hello, how can I Select and dont'show duplicates?
actually it's showing like that: apple | apple | apples | apple
this is my code:
$search = $_GET['q'];
$query = "SELECT * FROM query WHERE searchquery LIKE '%$search%' AND searchquery <> '$search'";
...
var list = (from i in _dataContext.aspnet_Users.Include("aspnet_Membership") where i.UserName.Contains(userName) select i ).ToList();
if userName="" then nothing return. how can i do that if empty string then return all records?
...
Hi I have the following code;
if( ! empty( $post['search-bar'] ) ) {
$search_data = preg_replace("#\s\s#is", '', preg_replace("#[^\w\d\s+]#is", '', $post['search-bar'] ) );
$data_array = explode( " ", $search_data );
$data_array = "'%" . implode( "%' OR '%", $data_array ) . "%'";
$query = "
SELECT CONCAT( PROFILE_PROFF...
I want to add the new facebook like button to my blogger website.
http://developers.facebook.com/docs/reference/plugins/like
I have to pass the url to the blog posts in the iframe src tag.
I can get the blogger posts url from <data:post.url/> but I can't put that in a src string because Bloggers template system is weird.
I want to do t...
Hi fellow programmer
I want to use SQL's Like keyword in dynamic LINQ.
The query that I want to make is like this
select * from table_a where column_a like '%search%'
Where the column_a can be dynamically changed to other column etc
In this dynamic LINQ
var result = db.table_a.Where( a=> (a.column_a.Contains("search")) );
But th...
I've already checked answers to questions like this one (How do I create a PDO parameterized query with a LIKE statement in PHP).
I've ended up to this solution:
$sql = "SELECT count(*) ".
"FROM avs_souscript ".
"WHERE num_certif =\"\" ".
"AND date_annul=\"\" ".
"AND user=:sess_user ".
"AND user!...
i need to use the like operator in a linq query
for this:
timb = time.Timbratures.Include("Anagrafica_Dipendente")
.Where(p => p.Anagrafica_Dipendente.Cognome + " " + p.Anagrafica_Dipendente.Nome like "%ci%");
How can i do?
...
Hi,
I want to add Facebook's new 'Like' button on the articles on my Joomla website. When I tried, I could add the button for my website, but not for individual articles.
How can I achieve the integration with an individual article.
The end result should look something like Mashable.com where 'Like' button appears on each article.
Thank...
Im trying to implemet Facebook Like with OpenGraph and Im getting weird error:
You must specify an URL as part of this widget or API.
I added Open Graph protocol to meta tags, added < fb:like> tag with URL to that page, added JavaScript SDK init.
Like appears, I click, and that error is shown. Does anyone knows what to do
Thanks
...
I've add the facebook Like button to http://www.goldfishview.com/ and that works great. Its powered by Blogger.
Now I want to move it to the end of my posts instead of a the beginning.
I move the facebook iframe and the preview looks great, but once I save the template it reverts back to were it was.
I've tried in Chrome and Firefox. In ...
Suppose it's a nub question, but is there an analog of mysql's LIKE function in php?
So, e.g. :
like('goo*','google.com');//is true
like('*gl*','google.com');//true
like('google.com','google.com')//also true
I know regex rullez, but don't know any solution to reach this
...
How do I add a FaceBook 'like' button to my master pages, does it need to be different for each page?
...