dongmeng4742 2018-03-26 09:19
浏览 25

从表中选择最后插入的数据

First I tried to look for the answer on here(stackoverflow) as well as other sites like a microsoft forum, but couldn't find anything that answered my question. Or I just couldn't understand.

I'm working on a (school)project I got from a company, they gave me acces to their database. In here is a table with data from a sensor that registers stuff every once in a while.

Now my question is: I want to get the last data inserted into the table and show just one row (echo or print, I dont really mind how, I just want it to work and to understand it.)

The table looks as followed: Tablename= container_1

I want to show the last inserted data in COL 3. Is there a way to do this with the table the company provided me with?

  • 写回答

1条回答 默认 最新

  • douya2007 2018-03-26 09:22
    关注

    Using phpmyadmin you can:

    Select * from your_table order by col1 desc Limit 1;
    

    This way you'll only have the last entry

    评论

报告相同问题?

悬赏问题

  • ¥15 关于#java#的问题:找一份能快速看完mooc视频的代码
  • ¥15 这种微信登录授权 谁可以做啊
  • ¥15 请问我该如何添加自己的数据去运行蚁群算法代码
  • ¥20 用HslCommunication 连接欧姆龙 plc有时会连接失败。报异常为“未知错误”
  • ¥15 网络设备配置与管理这个该怎么弄
  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!