我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

自动更新或插入(如果不存在)到mysql数据库中

I am getting user review in one table. In another table I am storing most occurring words in the review with their frequency value.

If new review added, it may contain new words or already existing word into list.

if it is new, then add into list. Other wise update the occurrence of words into table.

Is there any mysql, php function to handle this sort of scenario?

You can use the ON DUPLICATE KEY UPDATE logic explained on MySQL.com, it sounds like it will solve your problem.

近期文章

  • 从先前生成的结果集中获取值
  • Yii - 如何在CGridView中显示用户自己上传的数据?
  • 为什么我的数据没有显示?
  • 创建自定义帖子类型wordpress:更改标签
  • 将json_encode数据转换为javascript数组
  • 使用用户名+乱码的MD5进行JSON请求有什么缺陷吗?
  • Laravel 4没有将会话值从控制器传递到视图
  • 限制输入一些个人信息
  • php登录脚本不起作用[重复]
  • 从PHP文件中提取数据
  • 如何从“某些”服务器上的instagram获取数据
  • 文件可以包含在两个CPanel帐户之间吗?
  • 如何将导航配置导入到我的视图助手中?
  • 更新多个MySQL列
  • Laravel - 加入四张桌子
  • 重新排列mutidimention数组PHP
  • laravel检查用户是否处于活动状态?
  • 从wp_postmeta检索数据
  • Wordpress页脚不显示在常规页面上...仅限主页
  • Javascript元素id到AJAX url

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华