阅读背景:

如何知道MySQL更新查询是否因为提供的信息与数据库中已有的数据匹配而失败?

来源:互联网 

I have a query where the user types a block of text in a textarea field. They are able to save this information in a database. The problem is that if they have not changed the information or if the information matches the data already in the database, I recieve a '0' for affected rows. Usually I display an error that says the query failed when there are no affected rows. How would I 'know' that the 0 affected rows is because the data already exists, so that I can display a more specific error?I have a query where the user types a block of




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: