php+mysql代码生成器下载

时间:2013-09-24 10:08:47
【文件属性】:

文件名称:php+mysql代码生成器下载

文件大小:121KB

文件格式:RAR

更新时间:2013-09-24 10:08:47

php+mysql代码生成器 php代码生成器

做的内容就是剩掉你写sql语句的时间 有显示,插入,修改,删除,还有显示的表格和添加修改的表单! 下载后把MakeCode.exe.config里的用名和密码改成你本地的!就可以简单的生成! 里面用到的mysql类,还有sql语句中的函数,都在其它代码中 if($_POST['id']==''){ //INSEART $InsertSQL = sprintf("INSEART INTO cuku_faqcat (`catname`,`list`,`cont`) VALUES (%s ,%s ,%s )", GetSQLValueString($_POST['catname'],"text"), GetSQLValueString($_POST['list'],"int"), GetSQLValueString($_POST['cont'],"text")); $db->query($InsertSQL); }else{ //UPDATE $UpdateSQL = sprintf("UPDATE cuku_faqcat SET `catname`= %s, `list`= %s, `cont`= %s where `id`= %s)", GetSQLValueString($_POST['catname'] ,"text"), GetSQLValueString($_POST['list'] ,"int"), GetSQLValueString($_POST['cont'] ,"text"), GetSQLValueString($_POST['id'],"int")); $db->query($UpdateSQL); } //生成时用到的函数 function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "now()"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; case "sqltable": $theValue = ($theValue != "") ? $theValue : die("NULL Table"); break; } return $theValue; } //引入数据库类 include"./mysql.php"; //声明数据库 $db = new Dirver(); 加上数据库类的写法!


【文件预览】:
Maticsoft.DBUtility.dll
MakeCode.exe
MySql.Data.dll
MakeCode.exe.config

网友评论

  • 新手用不错
  • 生成的代码需要自己删减一下,适合新手
  • 这个很好用!!!!
  • 可以使用,很好
  • 可以使用,就是说明的更清楚详细些就好了!
  • 一个窗口工具,生成代码是不能直接保存的,要自己有选择性的复制和保存。没有什么说明文档,只能自己摸索了
  • 可以用,好像要手工修改MakeCode.exe.config 数据库连接
  • 可以使用,就是说明的更清楚详细些就好了!