delete LIKE
Добавлено: 2009-04-04 18:03:30
Код: Выделить всё
delete from smf_messages where body LIKE '*ть'
точнее он работает, но ничего не удаляет, данное слово точно есть!!
не получется выставить кодировку UTF8 чтобы воспользоватся консолем, делю через скрипт
вот полностью
Код: Выделить всё
#!/usr/bin/perl
use DBI;
$dbh = DBI->connect(
"DBI:mysql:database=dj_db;host=localhost",
'root',
'dfgdfgdgh',
{ RaiseError => 1,
PrintError => 1 }
) || die $DBI::errstr;
my $sth = $dbh->prepare(
" delete from smf_messages where body LIKE '*ля'
"
);
$sth->execute();
# my $rows;
# push @{$rows}, $_ while $_ = $sth->fetchrow_hashref();
$sth->finish();
# print @{$rows};