나는 시도하고 내 데이터베이스에 쿼리를 실행 :PHP SQL 명령은 단순히 데이터베이스 테이블을 지우시겠습니까?
$mysqli->query("UPDATE
catalogsearch_fulltext
SET data_index = '".$unique_string."'
WHERE MATCH(data_index) AGAINST ('".$savestring."')
AND store_id = '1'");
이 작동하지 않을뿐만 아니라, 나의 전적인 catalogsearch_fulltext
테이블을 지 웁니다. 내가 도대체 뭘 잘못하고있는 겁니까? 나는 다소 SQL에 익숙하지 않기 때문에 이것은 누군가가 발견 할 수있는 빠른 오류 일 것입니다.
요청하면 더 많은 코드를 제공 할 수 있지만 적용 가능하지 않다고 생각합니다.
감사합니다.
편집 :
$unique_string = "325-FBA-BA-0006-x3|Badger|Enabled|Taxable Goods|Badger - SPF 30+ Anti-Bug Sunscreen, 2.9oz. - (Pack of 3)|47300|You asked, and Badger listened! After receiving many requests for a totally natural combination bug repellent and sunscreen, Badger took their wildly popular SPF 30+ Sunscreen formula and combined it with their Anti-Bug Balm formula to create easy-to-apply, safe, and natural protection for the whole family!|43.35|1"
$string = "the same as above but with duplicat entries in the | Pipe | sections."
그것은이 쿼리는 약 6 기록을 통과 루프에 있음을 주목할 가치가있다.
$ unique_string 및 $ savestring 값은 무엇입니까? – kieran
$ unique_string 및 $ savestring은 매우 길지만 게시글에 값을 추가합니다. –
이상한 외래 키 설정이나 주입 취약성이없는 한 업데이트로 레코드를 삭제해서는 안됩니다. –