开启辅助访问 切换到宽版

精易论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

用微信号发送消息登录论坛

新人指南 邀请好友注册 - 我关注人的新帖 教你赚取精币 - 每日签到


求职/招聘- 论坛接单- 开发者大厅

论坛版规 总版规 - 建议/投诉 - 应聘版主 - 精华帖总集 积分说明 - 禁言标准 - 有奖举报

查看: 611|回复: 4
收起左侧

[求助] 求大佬帮忙看看!这个怎么取出来MYSQL取数据

[复制链接]
结帖率:38% (8/21)
发表于 2022-8-8 00:04:13 | 显示全部楼层 |阅读模式   四川省遂宁市
20精币
本帖最后由 暗芒团队君君 于 2022-8-8 00:18 编辑

已知在数据库的tata表 字段是   需要在这个字段里面取出,"polar_already":(["wood":2,"earth":2,"water":2,"total":0,"fire":2,"metal":2,]),这个数据   
想取出这里面的 "wood":2,值来更改然后在放进数据库里面

  
QQ图片20220808000252.png
而且还知道"wood":2    知道里面的很多数据   但是他就是读取不出来 这个值是多少   怎么取都取不出来   想吧这个字段里面的这个数据的数值在数据库里面吧这个数据更改了


下面是在数据库这个字段里面的所有数据
"me":(["dijie_finish":1,"wood":1,"resist_lost":0,"life":24454,"pot":2000000000,"cash":189253750,"religion":1,"resist_wood":0,"stat_coin_cost":(["minfo":({}),"winfo":({}),"mcoin":1,"wcoin":1,"muptime":1659340800,"wuptime":1659340800,"lstime":1659873724,]),"master":"5454454","friend_converted":3,"con":170,"earth":1,"reputation":200000,"version_prompt":(["1.60":3,]),"first_login_time":1659755552,"resist_poison":0,"voucher":189253750,"service":(["位列仙班":(["end_time":1662465724,"start_time":1659873724,]),]),"task_finished":(["apprentice_task":1,]),"last_login_time":1659877125,"resisit_wood":0,"dex":170,"task_stat":(["finish":(["11":4175,"10":4175,"9":4175,"8":4175,"7":4175,"6":4175,]),]),"stage_tasks":(["tanxun-zhenxiang":1,"liqin_efei":1,"yongqin-yuguai":1,"yaomo-dangdao":1,"zhenjia-shenshou":1,"shilian-zhidao":1,"chumo-weidao":1,]),"store_converted":1,"energy":1500,"polar":3,"block_state":0,"polar_wood":0,"generate_time":1659877617,"phy_power":970,"last_login_ip":"192.168.1.6","resist_metal":0,"anticheater_info":(["interval":6638,"total_steps":120,"last_move_time":1659877125,]),"recover_energy_time":1659876161,"pennant_skill":"nujiao-lianzhan","has_trade_goods":0,"max_cash":189253750,"today_played_time":2694,"balance":556791250,"fire":1,"task":([974:(["state":"0","polar":1,]),395:(["state":100,"sub_name":"tianjie10","upgrade_type":0,"level":179,"next_task_name":"",]),339:(["state":"1","upgrade_type":0,"finish":([]),]),852:(["ct":1659873707,]),294:(["owner_gid":"0000000000000012","rt":1659755544,"log":"4552454","init_time":(["1659877125":"556454",]),]),]),243:(["state":"b","ver":1,]),750:(["state":"0","snap_log":"前往#P%s#P处了解物理法术合击。","upgrade_type":0,]),734:([]),156:(["state":"1","update_time":1659877125,"bonus_times":2,]),644:(["state":"0","upgrade_type":0,]),1091:(["et":1659887999,"total":480,]),1072:(["state":"1",]),1074:(["state":"0",]),1076:(["state":"0",]),1087:(["ti":1659873707,"exp":4534706,"tao":27229,]),1061:(["et":1659887999,"total":120,]),21:(["state":0,"times":0,"new_ver":1,"max_times":1,"bonus_time":1659859199,"upgrade_type":0,]),1038:(["state":"0","ti":1659873707,]),]),"title_type_effect":U,"age":0,"resist_lock":0,"speed":392,"mana":16429,"init_basic_info":1,"water":1,"name":"56454524","accurate":0,"region":(["flag":1,"province":1,"city":1,]),"double_cash":2,"protect_bonus":(["ti":1659877125,"hour":0,]),"double_balance":2,"attrib_point":668,"resist_fire":0,"level":165,"resist_frozen":0,"max_life":24405,"max_mana":16400,"unique_data":([0:536870912,2:64,5:53316,4:201326592,3:-1073741824,1:-63371264,]),"soul_cob_rate":0,"tao":36000,"appellation":([]),"portrait":7003,"account":"momomo","act_stat":(["ti":1659873707,"mons":({0,0,0,}),"ytd":([]),"td":(["13":1,"0":1659873724,]),]),"last_login_mac":"00002a336f020111","resist_earth":0,"last_privilege":0,"question":(["answer_times":0,]),"gender":1,"max_stamina":264,"last_logout_time":1659877617,"polar_water":0,"polar_earth":0,"exp_to_next_level":2100000000,"gold_coin":1999999999,"ip_region":(["province":"北京市","city":"东城区",]),"restriction":(["login_time":1659877125,]),"character":(["kindness":0,"harmony":0,"desc":"普普通通","carefulness":0,"courage":0,]),"pker":0,"resist_forgotten":0,"task_round":(["962":0,]),"polar_already":(["wood":2,"earth":2,"water":2,"total":0,"fire":2,"metal":2,]),"cur_ver":17,"str":170,"metal":1,"max_balance":556791250,"wiz":170,"stamina":129,"salary":(["online_time":(["1659945600":2572,]),]),"wudao":(["cur_stage":1,"cur_stage_info":(["3":(["rep":182,"max_rep":2032,]),]),"ver":2,]),"def":913,"polar_fire":0,"icon":7003,"upgrade":(["dex":5,"max_polar_extra":20,"max_level":165,"attrib_point":12,"type":4,"attrib_total":20,"con":5,"total":0,"str":5,"cur_ver":6,"wiz":5,]),"resisit_fire":0,"resist_repress":0,"previous_login_ip":"192.168.1.6","appellation_ids":([7:33554432,3:2048,1:134217728,4:2,]),"max_energy":1500,"resisit_earth":0,"resist_cage":0,"resist_melt":0,"mag_power":918,"xieling":1,"limit_trade_coin":0,"total_played_time":6639,"newbie":1,"upgrade_magic":70,"dodge":0,"resist_confusion":0,"top_data":(["speed":385,"def":897,"phy_power":954,"mag_power":908,]),"resisit_water":0,"gid":"0000000000000012","user_converted":7,"first_login_ip":"120.14.116.98","resist_sleep":0,"max_assign_polar":50,"silver_coin":0,"limit_per_month":(["ti":1659755553,"11":1,]),"title_effect":"帝","family":"开天门","title":"帝","polar_point":129,"achieve":681,"resist_water":0,"resisit_metal":0,"have_coin_pwd":0,"first_login_mac":"0000047c16007f43","upgrade_immortal":35,"has_upgraded":1,"total_score":200000,"max_account_lv":165,"wudou":(["last_cost_time":1659283200,]),"polar_metal":0,"logout_time":1659877617,"exp":0,"limit_per_day":(["ti":1659873707,"777":1,"783":1,]),"scroll":(["time":1659873709,]),"parry":0,"auth_protect_prompt":1,"login_times":19,"insider_time":38609,]),"discover_world":(["1":([]),]),"settings":({({"",({33,0,1,}),}),}),"skills_map":([]),"skills":(["shuitian-yise":264,]),])


求大佬们帮帮忙!搞了好多t




求助知识:请将问题描述清楚,最好把你有问题的源码打包上传上来,这样更方便大家帮助你。
友情提醒:本版被采纳的主题可在 申请荣誉值 帖子申请荣誉值,获得 3点 荣誉值,荣誉值可兑换荣誉会员、终身vip用户组。
发表于 2022-8-8 05:57:18 | 显示全部楼层   **
数据取出来之后json解析
回复

使用道具 举报

签到天数: 10 天

发表于 2022-8-8 09:00:13 | 显示全部楼层   辽宁省辽阳市
首先,楼主确定取出了字段中的所有数据了吗?根据楼主贴出的数据内容,并不是一段完整的json格式文本。无法再进行下一步。
其次,如果取到了该字段的全部文本内容,可以:⑴先使用json解析。⑵取出wood值。⑶修改wood值。⑷将json文本重新写入数据库。
回复

使用道具 举报

结帖率:38% (8/21)
 楼主| 发表于 2022-8-8 11:28:27 高大上手机用户 | 显示全部楼层   四川省遂宁市
辽阳小哲 发表于 2022-8-8 09:00
首先,楼主确定取出了字段中的所有数据了吗?根据楼主贴出的数据内容,并不是一段完整的json格式文本。无法 ...

不知道怎么解析啊!不能在数据库只取那一段么!是不全因为是游戏!我怕全放上面客户给删了
回复

使用道具 举报

签到天数: 10 天

发表于 2022-8-8 13:12:41 | 显示全部楼层   辽宁省辽阳市
暗芒团队君君 发表于 2022-8-8 11:28
不知道怎么解析啊!不能在数据库只取那一段么!是不全因为是游戏!我怕全放上面客户给删了 ...

json解析的模块有很多,精易模块json类,zyjson,yyjson等等。每种模块的使用方法大同小异,简单看看就懂了。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则 致发广告者

发布主题 收藏帖子 返回列表

sitemap| 易语言源码| 易语言教程| 易语言论坛| 易语言模块| 手机版| 广告投放| 精易论坛
拒绝任何人以任何形式在本论坛发表与中华人民共和国法律相抵触的言论,本站内容均为会员发表,并不代表精易立场!
论坛帖子内容仅用于技术交流学习和研究的目的,严禁用于非法目的,否则造成一切后果自负!如帖子内容侵害到你的权益,请联系我们!
防范网络诈骗,远离网络犯罪 违法和不良信息举报电话0663-3422125,QQ: 793400750,邮箱:wp@125.la
网站简介:精易论坛成立于2009年,是一个程序设计学习交流技术论坛,隶属于揭阳市揭东区精易科技有限公司所有。
Powered by Discuz! X3.4 揭阳市揭东区精易科技有限公司 ( 粤ICP备12094385号-1) 粤公网安备 44522102000125 增值电信业务经营许可证 粤B2-20192173

快速回复 返回顶部 返回列表