MySQL Forums
Forum List  »  PHP

Re: Select and Update in one query same table
Posted by: Peter Brawley
Date: July 12, 2020 10:35AM

> mysql_connect("localhost","root","mypassword") or die (mysql_error());

Don't use the mysql interface, it's obsolete, it's been removed from current php versions. Use mysqli instead.

And regarding multiple queries, best practice is to do the queries one at a time, canvassing for errors on each query call from start transaction through commit, with appropriate rollback & restart code.

Options: ReplyQuote


Subject
Written By
Posted
Re: Select and Update in one query same table
July 12, 2020 10:35AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.