skip to Main Content

SQL statement to replace final part of an URL – Phpmyadmin

Replace in a videos table with a column URL with many different URL types. I use MariaDB 10.3 https://google.com/questions/ask?963 https://google.com/embed/57=66.88.028.10/i/03/077fsdf https://google.com/top57=66.88.028.10/i/03/077 https://video.net/emb.html?asdeen45dr57=66.88.028.10/i/03/07776/asdeen45dr57 https://video.net/fomdfk5f7s1f.html https://video.net/emb.html?qsfeen4gttv1=54.47.158.810/i/11/00036/qsfeen4gttv1 I need to delete part of a specific URL (delete all after =) and replace with…

VIEW QUESTION

PDO with bindParam() returns syntax error – Phpmyadmin

I'm doing a PDO UPDATE query to MariaDB database. $query = "UPDATE :table SET `name`=:name, `title`=:title, `description`=:description WHERE id=:id"; $stmt = $this->conn->prepare($query); $stmt->bindParam(':table',$this->table, PDO::PARAM_STR); $stmt->bindParam(':id',$this->id, PDO::PARAM_INT); $stmt->bindParam(':name',$this->name, PDO::PARAM_STR); $stmt->bindParam(':title',$this->title, PDO::PARAM_STR); $stmt->bindParam(':description',$this->description, PDO::PARAM_STR); $stmt->execute(); It seems to me that everything is…

VIEW QUESTION
Back To Top
Search