I have a bot which was written for wordpress so I don't want to insert post if its title already inserted in database how can I do that ?
Essentially - select title from your_table where title = new_title You can either do that statement - and check in php if a result is returned - if there is a result, the title exists, if there isn't a result you submit it... or you can use an if in your mysql statement - - for more info lookup mysql control flow functions - probably better design to do it from mysql.
Hello @Vicbowling thank you for your tips it was really helpful I wonder another side of inserting data is the value case sensetive ? I may have title that are upper case and lower case
Store them all in the database as lower case, using strtolower($var); when your displaying them you can make them upper case with strtoupper($var); or ucwords($var); which will make each letter capital on each word. There's lot's more information on this here, http://php.net/manual/en/book.strings.php Kind regards, Glen Hughes