OK I solved it (I hope its I good solution...let me know if there could be any bug)
$query3 = "SELECT * FROM sklad WHERE polozka='$_GET[polozka]'";
$Result3= mysql_query($qu ery3,$SQL);
$row3 = mysql_fetch_arr ay($Result3,$SQ L);
if ($row3==0){
$insertSQL = "INSERT INTO sklad (polozka, druh_tovaru, dodavatel, kusy) VALUES ('$_GET[polozka]', '$_GET[druh_tovaru]', '$_GET[dodavatel]',...
User Profile
Collapse
-
ye yuo're right..
but i just realized that what i need is to make select from database case insensitive.... .
What i need is to avoid to have 2 same items in the database. So i want to make test before I write something to database if there is this item already or not(does not matter if with big or small letters)
my code for this looks like this:
$query3 = "SELECT * FROM sklad WHERE polozka='$_GET[polozka]'";...Leave a comment:
-
How to turn off case sensitivity
Hello all,
Just want to ask you how could I disable case sensitivity in php.
I am comparing 2 strings (letters and numbers) to add to database (mysql) only non existing strings.
code:
if ($_GET['polozka'] !== $row3['polozka']){
$insertSQL = "INSERT INTO sklad (polozka, druh_tovaru, dodavatel, kusy) VALUES ('$_GET[polozka]', '$_GET[druh_tovaru]', '$_GET[dodavatel]', '$_GET[kusy]')";...
No activity results to display
Show More
Leave a comment: