<?php mysql_connect("localhost","root","root");mysql_select_db("test");//保留最新的1000条记录$limit=1000;$query="select `id` from `news`";$result=mysql_query($query);$num=mysql_num_rows($result);if($num>$lim…
使用node js 操作 Mysql 数据库 http://www.nodejs.org/ //node js 数据库操作 MySQL //使用https://github.com/felixge/node-mysql //sql 操作 http://www.w3school.com.cn/sql/ //http://see.xidian.edu.cn/cpp/html/1441.html /** 建立数据库连接 */ var mysql = require('mysql'); var conn…