SQL Search doesn't find all values - mysql

I'm beginner in MySQL and I want to make a request to find all tables with this word "Ostéotomie", it works only if I write "%Ost%" and not "%Ostéotomie%"
The fact is that it shows me only 4 results instead of the 9 I need.
Here is a SQL Fiddle to show what I mean : SQL Fiddle
The table wasn't created by me, I'm working on a search bar from a project which isn't mine.
I don't know if you can help me, if I've putted enough information.
Thanks in advance.

I tried replacing é with % and the query gave me expected results.

https://dev.mysql.com/doc/refman/8.0/en/charset-binary-collations.html
Maybe this solved your Problem.

Related

MS Access IIf Function

I have a calculated field on a table at MS Access and I'd like to use the following syntax, but it returns a syntax error pop-up and and I'm wondering which part is wrong. Could you please help with this? Thanks a lot.
IIf([Letter_Grade]="A+",4,IIf([Letter_Grade]="A",4,IIf([Letter_Grade]="A",3.7,IIf([Letter_Grade]="B+",3.3,IIf([Letter_Grade]="B",3,IIf([Letter_Grade]="B",2.7,IIf([Letter_Grade]="C+",2.3,IIf([Letter_Grade]="C",2,IIf([Letter_Grade]="C",1.7,IIf([Letter_Grade]="D+",1.3,IIf([Letter_Grade]="D",1,IIf([Letter_Grade]="D-",0.7,IIf([Letter_Grade]="F",0)))))))))))))
Try adding ",null" after your last expression:
IIf([Letter_Grade]="F",0,null)))))))))))))
Though it may be better to use a query?
The function works well, did you put = operator before it.
Attached are some images of the results I got and the function

Find and Replace Using phpMyAdmin

Please could someone help me understand why the following SQL doesn't work:
UPDATE `v2rns_content_new`
SET `images`= REPLACE(`images`, 'images\/news_images', 'images\/news_images\/legacy');
I am trying to find and replace the bold part of the following string (there are multiple records in the database with similar strings but the filenames e.g. example.png are different):
{"image_intro":"images\ /news_images\ /example.png","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}
Please note: I asked a related question yesterday (which will provide some background) but I feel that this question is best asked separately - Updating all rows within a single column using phpMyAdmin
I have managed to solve the issue by changing the already escaped \ to \
e.g. UPDATE v2rns_content_new SET images = REPLACE(images, 'images\\/news_images, 'images\\/news_images\/legacy')
Thanks to #GeolezTrol for pointing me in the right direction.

Getting a weird error with MySQL

This is very difficult to explain, so I took pictures. The first is the error I'm getting, the second is that section of code. Can anyone help me determine what is wrong? I can provide more information if needed.
http://tinypic.com/r/14dlu2v/5
http://tinypic.com/r/2057grb/5
EDIT: Fixed!
Maybe you may want to check whether you got a return set. See the documentation below, look at example two.
http://www.php.net/manual/en/mysqli.quickstart.statements.php

MYSQL UPDATE not updating correctly

I just want to say sorry if this is a really easy question but I'm overworked with this site to the point where parts of the code that are working aren't making sense, any help in telling me why this MYSQL UPDATE isn't working would be greatly appreciated
mysql_query("UPDATE setlist SET song_artist='$song_artist1' AND song_name='$song_name1' WHERE song_id='$song_id'");
When it does work the value is being entered as a 0 (which I believe would mean NULL but all of the variables are working correctly as I have used a die statement with the variables inputted into it, I am also not generating any errors from mysql_error, any help would be appreciated, thanks!
This is my MYSQL table setout.
song_id
song_artist
song_name
Replace AND with a comma,should work.
'$song_id'
remove the quotes.

A SQL query that used to work does not work anymore

I have an SQL query that works on older version of MySQL4 but won't work on my current version of 5.5
I'm hoping someone can see what I can't see with this.
select tblprefix_groups_permissions.permission_name
from tblprefix_groups_permissions, tblprefix_users, tblprefix_permissions
where tblprefix_groups_permissions.permission_name = tblprefix_permissions.permission_name
and tblprefix_groups_permissions.group_id = tblprefix_users.group_id
and (tblprefix_users.user_id = '==NUMERIC ID=='
and (tblprefix_permissions.permission_name = 'ADMIN::SETTINGS::VIEW'
or tblprefix_permissions.permission_name = 'ALL'))
The SQL statement should be pretty self explanitory as to what it does, I don't see where the hangup could be. It is suppost to return a list if it returns nothing then the user is rejected.
It looks like you have wrongly placed the quotes here:
ADMIN::SETTINGS::VIEW''
Anyway... are you sure that works in MySQL 4?
BTW, you can remove the outer brackets.
The statement is correct, I overlooked the fact that the statement also checks to make sure the Permission is in the Master Permissions table ie: tblprefix_permissions.permission_name I had not put the permission into the Master Permissions table yet
So that makes me stupid or just tired LOL sorry guys, good work though and thanks for the quick responses