Hello guys. I am editing a guilds.php page that I can filter the guilds by name...
But I don't know how command use to filter guilds by name.
How command I use to filter a guild name only with "X" character like:
strpos($caracter, $string)
Like this:
But not specific test name guild just test or name or guild and found for all guilds with this characters..
Consegui:
$guilds_list->setFilter(new SQL_Filter(new SQL_Field('name'), SQL_Filter::LIKE, "%test%"));
But I don't know how command use to filter guilds by name.
PHP:
$guilds_list = new DatabaseList('Guild');
$guilds_list->addOrder(new SQL_Order(new SQL_Field('name'), SQL_Order::ASC));
How command I use to filter a guild name only with "X" character like:
strpos($caracter, $string)
Like this:
PHP:
$guilds_list->setFilter(new SQL_Filter(new SQL_Field('name'), SQL_Filter::LIKE, "Test Name Guild"));
But not specific test name guild just test or name or guild and found for all guilds with this characters..
Post automatically merged:
Consegui:
$guilds_list->setFilter(new SQL_Filter(new SQL_Field('name'), SQL_Filter::LIKE, "%test%"));
Last edited: