我想删除数据库中包含 .jpg 扩展名所在的 URL 的所有行!
我在用
try{
java.sql.Statement mystat=connection.createStatement();
String delete_jpg="DELETE FROM mytable WHERE mycol LIKE '%.jpg%' ";
mystat.executeUpdate(delete_jpg);
}catch(Exception e){
}
使用 Java JDBC 执行此查询完全没有错误,但也不会删除行!请有人可以告诉我我做错了什么!!!
示例 URL 是:
images/affiliation-logo4.png HTTP/1.1
images/661.jpg HTTP/1.1
footerslider/images/blue-left-arrow.png HTTP/1.1
footerslider/images/blue-right-arrow.png HTTP/1.1
media/contentHeader/32.jpg HTTP/1.1 //I want to delete this type of rows
index.php?option=com_content&task=view&id=543 HTTP/1.1
images/favic.ico HTTP/1.1
src/ HTTP/1.0
uiit/faculty.php?dept_id=31 HTTP/1.1
uims/faculty.php?dept_id=32 HTTP/1.1
media/profile/dhS1t8X.jpg HTTP/1.1 //I want to delete this type of rows
media/profile/SSbkpgG.jpg HTTP/1.1 //I want to delete this type of rows