Compare/SQL.php
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Posts: 40
- Joined: 12 Jul 2018, 19:57
Compare/SQL.php
Hi there;
I need to extend /vendor/aimeos/aimeos-core/lib/mwlib/src/MW/Criteria/Expression/Compare/SQL.php what is the best way to do that.
I need this, in the tables views in admin when you search a text it is camel case, so i want to add a new operator in that file to create a searc non-camel-case.
Thanks
I need to extend /vendor/aimeos/aimeos-core/lib/mwlib/src/MW/Criteria/Expression/Compare/SQL.php what is the best way to do that.
I need this, in the tables views in admin when you search a text it is camel case, so i want to add a new operator in that file to create a searc non-camel-case.
Thanks
--
Jorge A Ramirez
System Engineer
PHP Developer
Jorge A Ramirez
System Engineer
PHP Developer
Re: Compare/SQL.php
Which database are you using? If it's MySQL, the simplest way to case insensitive comparison is using "utf8mb4_unicode_ci" as collation in ./config/database.php
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
-
- Posts: 40
- Joined: 12 Jul 2018, 19:57
Re: Compare/SQL.php
You can overwrite the createSearch() method in every manager where you need the alternative criteria implementation:
https://github.com/aimeos/aimeos-core/b ... se.php#L74
Unfortunately, it's not possible to replace the base class to provide an alternative criteria implementation for all classes inheriting from that one.
https://github.com/aimeos/aimeos-core/b ... se.php#L74
Unfortunately, it's not possible to replace the base class to provide an alternative criteria implementation for all classes inheriting from that one.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Compare/SQL.php
Hello,
Will you please tell me, how to create a MySQL Database Using MySQLi and PDO?
As I am a beginner, I have tried to run the code but it did not work.
<?php
//Make the database connection.
db_connect() or die('Unable to connect to database server!');
function db_connect($server = 'localhost', $username = 'root', $password = '', $database = 'hct_db', $link = 'db_link') {
global $$link;
$$link = mysql_connect($server, $username, $password);
if ($$link) mysql_select_db($database);
return $$link;
}
//Function to handle database errors.
function db_error($query, $errno, $error) {
die('Cannot connect to database');
}
//Function to query the database.
function db_query($query, $link = 'db_link') {
global $$link;
$result = mysql_query($query, $$link) or db_error($query, mysql_errno(), mysql_error());
return $result;
}
//Get a row from the database query
function db_fetch_array($db_query) {
return mysql_fetch_array($db_query, MYSQL_ASSOC);
}
?>
Will you please tell me, how to create a MySQL Database Using MySQLi and PDO?
As I am a beginner, I have tried to run the code but it did not work.
<?php
//Make the database connection.
db_connect() or die('Unable to connect to database server!');
function db_connect($server = 'localhost', $username = 'root', $password = '', $database = 'hct_db', $link = 'db_link') {
global $$link;
$$link = mysql_connect($server, $username, $password);
if ($$link) mysql_select_db($database);
return $$link;
}
//Function to handle database errors.
function db_error($query, $errno, $error) {
die('Cannot connect to database');
}
//Function to query the database.
function db_query($query, $link = 'db_link') {
global $$link;
$result = mysql_query($query, $$link) or db_error($query, mysql_errno(), mysql_error());
return $result;
}
//Get a row from the database query
function db_fetch_array($db_query) {
return mysql_fetch_array($db_query, MYSQL_ASSOC);
}
?>