本文目录一览:
- 1、急需关于mysql数据库知识。。基础点,在哪可以下载到啊
- 2、mysql数据库从下载到使用
- 3、怎么下载MYSQL数据库啊
- 4、mysql数据库到底下载哪个
- 5、mysql数据库下载地址?
- 6、我想要安装mysql数据库 都需要下载什麽东西?
急需关于mysql数据库知识。。基础点,在哪可以下载到啊
?php//$TEXT['phonebook-sure']='删除';
class F{
//----------------------------------------连接
function connect()
{
$con = mysql_connect("localhost","root","123456");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
else
{
echo "连接成功";
}
}
//----------------------------------------关闭
function closeDB()
{
$con = mysql_connect("localhost","root","123456");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
else
{
echo "br/";
echo "关闭成功";
}
mysql_close($con);
}
//------------------------------增加(无参数):
function create()
{
$con = mysql_connect("localhost","root","123456");
mysql_select_db("student", $con);
$sql="INSERT INTO parker (id, name)VALUES('$_POST[id]','$_POST[name]')";
if (!mysql_query($sql,$con))
{
//die('Error: ' . mysql_error());
echo "无添加信息";
}
else
echo "插入成功!";
}
//------------------------------增加(有参数):
function newCreate($id,$name)
{
$con = mysql_connect("localhost","root","123456");
mysql_select_db("student", $con);
$sql="INSERT INTO parker (id, name)VALUES('$id','$name')";
if (!mysql_query($sql,$con))
{
//die('Error: ' . mysql_error());
echo "无添加信息";
}
else
echo "插入成功,请刷新!";
}
//------------------------------------查询(无参数)
function select()
{
$con = mysql_connect("localhost","root","123456");
mysql_select_db("student", $con);
$output="删除";
$change='修改';
//查询方法
$result = mysql_query("SELECT * FROM parker");
//得到结果集
echo'br /';
echo "table border='1'
tr
th id/th
thname/th
th删除/th
th修改/th
/tr";
while($row = mysql_fetch_array($result))
{
echo "tr";
echo "td" . $row['id'] . "/td";
echo "td" . $row['name'] . "/td";
// echo "tdform action='deal.php' method='post' name='form1'input type='button' name ='button' value='删除' onClick/form/td";
// echo "tdform action='deal.php' method='post' name='form1'input type='button' name ='button' value='删除' /form/td";
// echo "td class='tabval'a onclick=\"return confirm('".$TEXT['phonebook-sure']."');\" href='phonebook.php?action=delid=".$row['id']."'span class='red'[".$TEXT['phonebook-button1']."]/span/a/td";
// echo "a onclick\" href='deal.php?action=del$id=".$row['id']."'/a";
echo "td class='tabval'a onclick=\"return confirm('\" href='deal.php?action=delid=".$row['id']."'span class='red'[".'删除'."]/span/a/td";
echo "td class='tabval'a onclick=\"return confirm('\" href='change.php?action=changeid=".$row['id']."'span class='red'[".'修改'."]/span/a/td";
// echo "td".$change."/td";
echo "/tr";
}
/*echo "button onclick="alert('"+?php echo $txt; ?+"')"/button";*/
echo "/table";
echo "查询成功!";
echo'br /';
}
//-------------------------------------------查询(有参数)
function selectNew($id)
{
//print_r($_POST['id']);
$id=$_POST['id'];
$con = mysql_connect("localhost","root","123456");
mysql_select_db("student", $con);
$output="删除";
$change='修改';
//查询方法
$result = mysql_query("SELECT * FROM parker WHERE id='$id'");
//得到结果集
echo'br /';
echo "table border='1'
tr
th id/th
thname/th
/tr";
while($row = mysql_fetch_array($result))
{
echo "tr";
echo "td" . $row['id'] . "/td";
echo "td" . $row['name'] . "/td";
echo "/tr";
}
echo "/table";
//echo "查询成功!";
echo'br /';
}
//-------------------------删除(无参数)
function delete()
{
$con = mysql_connect("localhost","root","123456");
mysql_select_db("student", $con);
$sql="DELETE FROM parker WHERE id='$_POST[id]'";
//mysql_query("DELETE FROM parker WHERE id='$_POST[id]'");
//if (!mysql_query("DELETE FROM parker WHERE id='$_POST[id]'"))
// {
// die('Error: ' . mysql_error());
//}
//else
// echo "删除成功";
if (!mysql_query($sql,$con))
{
//die('Error: ' . mysql_error());
echo "无操作";
}
else
{
echo "删除!";
}
}
//-------------------------删除(有参数)
function newDelete($id)
{
$con = mysql_connect("localhost","root","123456");
mysql_select_db("student", $con);
//mysql_query("DELETE FROM parker WHERE id='$_POST[id]'");
$sql="DELETE FROM parker WHERE id='$id'";
if (!mysql_query($sql,$con))
{
//die('Error: ' . mysql_error());
echo "无操作";
}
else
{
echo "删除!";
}
}
//-------------------------------------更新
function update($id,$name)
{
$con = mysql_connect("localhost","root","123456");
mysql_select_db("student", $con);
mysql_query("UPDATE parker SET name = '$name'WHERE id='$id'");
//if (!mysql_query("UPDATE parker SET name = '$_POST[name]'WHERE id='$_POST[id]'"))
// die('Error: ' . mysql_error());
//else
// echo "修改成功";
}
//------------------------------------统计表中有多少记录(无参数)
function count()
{
$con = mysql_connect("localhost","root","123456");
mysql_select_db("student", $con);
//mysql_query("select count(id) from parker");
$sql="SELECT COUNT(id) AS count FROM parker";
$result=mysql_fetch_array(mysql_query($sql));
$count=$result['count'];
echo "$count";
}
}
?
mysql数据库从下载到使用
从网站下载下来的mysql-windows版本是完整的服务器端和客户端的。一般都会同时装的。如果是你本机:
mysql -u用户 -p密码 应该就能直接进入mysql的命令模式
如果是连其他机器:
mysql -u用户 -p密码 -h其他机器IP
怎么下载MYSQL数据库啊
去mysql官网,找到downloads 点击(如图) 然后在弹出页面中间的下面找到
MySQL Community Server 下面一点就是几个版本的链接
Current Release (Recommended) //推荐版本
MySQL 5.1—Generally Available (GA) release for production use
Beta Releases
MySQL 5.4—Beta
Upcoming Releases
Snapshots — source code snapshots of the development trees
Glassfish+MySQL bundle — developers edition
Older Releases //老版本
MySQL 5.0 — Previous GA release
MySQL 4.1 — Previous GA release
Archives of Older Releases
mysql数据库到底下载哪个
下载mysql最新版本最好 ,然后再下载一个辅助工具 navicat for mysql
这是一个图形界面的软件 ,你可以在里面建表就行Oracle的plsqldev软件店功能一样 ,非常的方便和快捷。这些软件都是免费的
mysql数据库下载地址?
mysql官方网站:里面就有,直接解压就可以用了,不用安装,要是安装用户图形管理界面,navicat就足够了
我想要安装mysql数据库 都需要下载什麽东西?
phpmyadmin解压后就能用了关键是他的配置文件中的设定,建议你百度一下phpmyadmin配置.