- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
好吧,我在这里过得很艰难。尝试在 mySQL 数据库中实现一个为 postgreSQL 制作的开源 Web 应用程序。到目前为止,除了向数据库添加新人员之外,一切正常。
INSERT INTO data (
name, lastname, phone, mobileCarrier, paging, grade, dob, activity,
room, medical, parent1, parent2, parentEmail, notes, visitor,
joinDate, lastSeen, lastModified, count, picture
) VALUES (' . implode(', ', array_map(array($dbh, 'quote'), array(
$_POST['name'],
$_POST['lastname'],
$_POST['phone'],
(isset($_POST['mobileCarrier']) ? '1' : '0'),
$paging,
$_POST['grade'],
$_POST['dob'],
(is_numeric($_POST['activity']) ? $_POST['activity'] : 0 ),
(is_numeric($_POST['room']) ? $_POST['room'] : 0 ),
$_POST['medical'],
$_POST['parent1'],
$_POST['parent2'],
$_POST['parent_email'],
$_POST['notes'],
'f',
date('Y-m-d'),
date('Y-m-d'),
date('Y-m-d H:i:s.u'),
'0',
$photo_ref
))) . ') RETURNING id
这会产生错误:
PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RETURNING id' at line 5' in /myserver/register.php:102 Stack trace: 0 /myserver/register.php(102): PDO->query('INSERT INTO dat..
我很困惑,我绝对不是 dba,但我正在尽力而为。任何洞察力或朝正确方向的插入都会令人惊叹!我尝试将“RETURNING id”替换为“SELECT LAST_INSERT_ID();”无济于事。
如果您需要整个页面,这里是:
<?php
/* vim: tabstop=2:expandtab:softtabstop=2 */
require_once 'config.php';
require_once 'functions.php';
function resize_image($file, $w, $h, $crop=FALSE) {
// @param file, width, height, crop
// Resize an image using Imagick
$img = new Imagick($file);
if ($crop) {
$img->cropThumbnailImage($w, $h);
} else {
$img->thumbnailImage($w, $h, TRUE);
}
return $img;
}
$dbh = db_connect();
//internationalisation
$domain = "details";
require_once 'locale.php';
$register = FALSE; // placeholder to show success message
if ($_SERVER['REQUEST_METHOD'] == "POST" and array_key_exists('activity', $_POST)) {
$sth = $dbh->prepare('SELECT prefix FROM activities WHERE id = :id');
$sth->execute(array(":id" => $_POST['activity']));
$paging = $sth->fetchColumn() ."-"
. substr($_POST["phone"], -4);
$photo_ref = "";
if (array_key_exists("photo", $_FILES)) {
if ($_FILES["photo"]["type"] == "image/png" or
$_FILES["photo"]["type"] == "image/jpeg") {
if ($_FILES["photo"]["size"] < $photo_maxsize) {
// resize and save photo+thumbnail
/* python analogue of this bit checks the file system for the
* next image in the sequence, not the database */
$sth = $dbh->query("SELECT max(picture::integer) FROM data WHERE picture != '';");
$nextImage = $sth->fetchColumn() + 1;
$parts = explode("/", $_FILES["photo"]["type"]);
$target_path = $photo_path . str_pad($nextImage, 6, "0", 0) .
"." . $parts[1];
$target_thumb = $photo_path . "/thumbs/" .
str_pad($nextImage, 6, "0", 0) . "." . $parts[1];
$photo_ref = str_pad($nextImage, 6, "0", 0);
//resize to 480x480
$tmp = resize_image($_FILES["photo"]['tmp_name'], 480, 480);
if ($tmp->writeImage($target_path)) {
//resize to 128x128
$thumb = resize_image($_FILES["photo"]['tmp_name'], 128, 128);
if ($thumb->writeImage($target_thumb)) {
unlink($_FILES["photo"]['tmp_name']);
$photoSuccess = TRUE;
} else {
$photoSuccess = FALSE;
$reason = "Unable to save thumbnail";
}
} else {
$photoSuccess = FALSE;
$reason = "Unable to resize image";
}
} else {
$photoSuccess = FALSE;
$reason = "Image too large";
}
} else {
$photoSuccess = FALSE;
$reason = "Unsupported image type";
}
} else { $photoSuccess = TRUE; }
$id = $dbh->query('INSERT INTO data (
name, lastname, phone, mobileCarrier, paging, grade, dob, activity,
room, medical, parent1, parent2, parentEmail, notes, visitor,
joinDate, lastSeen, lastModified, count, picture
) VALUES (' . implode(', ', array_map(array($dbh, 'quote'), array(
$_POST['name'],
$_POST['lastname'],
$_POST['phone'],
(isset($_POST['mobileCarrier']) ? '1' : '0'),
$paging,
$_POST['grade'],
$_POST['dob'],
(is_numeric($_POST['activity']) ? $_POST['activity'] : 0 ),
(is_numeric($_POST['room']) ? $_POST['room'] : 0 ),
$_POST['medical'],
$_POST['parent1'],
$_POST['parent2'],
$_POST['parent_email'],
$_POST['notes'],
'f',
date('Y-m-d'),
date('Y-m-d'),
date('Y-m-d H:i:s.u'),
'0',
$photo_ref
))) . ') RETURNING id')->fetchColumn();
$register = TRUE;
header("Content-Type: application/json");
if ($register == TRUE) {
echo json_encode(array(
"success" => true,
"id" => $id,
"name" => $_POST["name"],
"lastname" => $_POST["lastname"]
));
exit;
} else {
echo "{\"success\":false}";
exit;
}
}
$page_title = "Register";
require_once "template/header.php";
?>
<!-- sidebar -->
<div class="span3">
<div class="well sidebar-nav">
<ul class="nav nav-list">
<li class="nav-header"><?php echo _("Search"); ?></li>
<li><a href="search.php"><i class="icon-search"></i><?php echo _("Search"); ?></a></li>
<li><a href="#"><i class="icon-filter"></i><?php echo _("Advanced"); ?></a></li>
<li><a href="#"><i class="icon-bookmark"></i><?php echo _("Saved Searches"); ?></a></li>
</ul>
<ul class="nav nav-list">
<li class="nav-header"><?php echo _("Actions"); ?></li>
<li class="active"><a href="#"><i class="icon-plus-sign"></i><?php echo _("Register"); ?></a></li>
<li><a href="#"><i class="icon-user"></i><?php echo _("Register Visitor"); ?></a></li>
</ul>
</div>
</div>
<!-- /sidebar -->
<div class="span9 well" style="overflow-x: auto;">
<ul class="thumbnails">
<li class="span6">
<div class="page-header" style="margin-bottom: 0px;">
<h1><?php echo _("Registration"); ?></h1>
</div>
</li>
</ul>
<div id="successalert" class="alert alert-success" style="display:none;">
<a class="close" data-dismiss="alert" href="#">×</a>
<h4 class="alert-heading"> <?php echo _("Registration Complete"); ?> </h4>
<!-- sprintf(_("Successfully registered <a href=\"details.php?id=" . $id . "\" >%s.</a>"),
$_POST["name"] . " " . $_POST["lastname"]) .-->
<span> </span>
</div>
<input type="file" accept="image/*" id="photoinput" name="origphoto" style="height: 0px; width: 0px;">
<form enctype="multipart/form-data" class="form-horizontal" action="register.php" method="post" name="details">
<fieldset>
<div class="control-group">
<label class="control-label">Photo</label>
<div class="controls">
<div style="display: table; width: 100%; height: 100%;" class="input-append">
<input type="text" readonly="" onclick="document.getElementById('photoinput').click();" class="input-xlarge" id="fakefileinput" style="cursor: pointer; cursor: hand;">
<a onclick="document.getElementById('photoinput').click();" style="margin-left: -4px; border-radius: 0 3px 3px 0; cursor: pointer; cursor: hand;" class="btn">Browse</a>
<div style="display: table-cell; vertical-align: middle; text-align: right;">
Drop file here. </div>
</div>
<div>
<div id="fileselecterror" class="alert alert-error" style="display: none;">
<?php echo _('Error: File type not supported.') ?>
</div>
<div id="photodndbox">
<div class="progress progress-striped active" style="display: none; margin: 6px 0 9px;">
<div id="photoupload_progressbar" style="width: 0%" class="bar"></div>
</div>
</div>
<div class="thumbnail" style="width: 100px; margin: 10px">
<img id="photopreview" style="width: 100px;" src="photo.php<?php echo "?id=" . $edata["picture"] ?>">
</div>
</div>
</div>
</div>
<div class="control-group">
<label class="control-label" for="name"><?php echo _("Name"); ?></label>
<div class="controls">
<div class="container-fluid" style="padding: 0;">
<div class="row-fluid">
<input type="text" class="input span5" name="name" id="name"
style="max-width: 350px" required
placeholder="<?php echo _("Name"); ?>" value="<?php echo $edata["name"]; ?>">
<div style="display: inline-block;"> </div>
<input type="text" class="input span5" name="lastname" id="lastname" required
placeholder="<?php echo _("Lastname"); ?>" value="<?php echo $edata["lastname"]; ?>">
</div>
</div>
</div>
</div>
<div class="control-group form-inline">
<label class="control-label" for="phone"><?php echo _("Phone"); ?></label>
<div class="controls">
<input type="tel" class="input-medium" name="phone" id="phone" required
onKeyDown="javascript:return dFilter (event.keyCode, this, '<?php echo _("(###) ###-####"); ?>');"
pattern="^\([2-9]\d\d\)\ [2-9]\d\d-\d\d\d\d$"
data-validation-pattern-message="Must be a valid North-American telephone number."
placeholder="<?php echo _("Phone"); ?>" value="<?php echo $edata["phone"]; ?>">
<label class="checkbox">
<input type="checkbox" name="mobileCarrier"
<?php echo $edata["mobileCarrier"] ? "checked" : ""?>> <?php echo _("Mobile Phone"); ?>
</label>
</div>
</div>
<div class="control-group form-inline">
<label class="control-label" for="grade"><?php echo _("Grade"); ?></label>
<div class="controls">
<div style="width: 220px; float: left; margin-right: 4px;">
<input type="text" class="input-small" name="grade" id="grade"
placeholder="<?php echo _("Grade"); ?>" value="<?php echo $edata["grade"]; ?>">
<label for="dob" style="float: right; padding-top: 5px; margin-right: 16px;">
<?php echo _("Birthdate"); ?></label>
</div>
<div>
<!--onKeyDown="return dFilter (event.keyCode, this, '####-##-##');"-->
<input type="date" class="input-small" name="dob" id="dob"
onkeyup="showAge();" oninput="showAge();" required
pattern="^[12]\d{3}-(0?[1-9]|1[0-2])-([012]?[0-9]|3[01])$"
data-validation-pattern-message="Must be a valid ISO8601 date."
placeholder=<?php echo _("YYYY-MM-DD"); ?>
value="<?php echo $edata["dob"]; ?>">
<span class="help-inline" id="age">Age: ?</span>
</div>
</div>
</div>
<div class="control-group">
<label class="control-label" for="activity">
<?php echo _("Activity"); ?>
</label>
<div class="controls">
<select name="activity" id="activity" required>
<?php
echo (is_null($edata["activity"]) ? "<option disabled selected>" .
_("Activity") . "</option>\n" : "");
$sth = $dbh->query('SELECT id, name FROM activities');
while ($data = $sth->fetch(PDO::FETCH_ASSOC)) {
echo "<option value=\"{$data["id"]}\"" .
($data["id"] == $edata["activity"] ? " selected" : "") .
">{$data["name"]}</option>\n";
}
?>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label" for="room"><?php echo _("Room"); ?></label>
<div class="controls">
<select name="room" id="room">
<?php
$sth = $dbh->query('SELECT id, name FROM rooms');
while ($data = $sth->fetch(PDO::FETCH_ASSOC))
echo "<option value=\"{$data[id]}\">{$data[name]}</option>\n";
?>
</select>
</div>
</div>
<div class="control-group form-inline">
<label class="control-label" for="medical"><?php echo _("Medical"); ?></label>
<div class="controls">
<input type="text" class="input" name="medical" id="medical"
placeholder="<?php echo _("Medical"); ?>">
</div>
</div>
<div class="control-group form-inline">
<label class="control-label" for="parent1"><?php echo _("Parent 1"); ?></label>
<div class="controls">
<input type="text" class="input" name="parent1" id="parent1"
placeholder="<?php echo _("Parent 1"); ?>" required>
</div>
</div>
<div class="control-group form-inline">
<label class="control-label" for="parent2"><?php echo _("Parent 2"); ?></label>
<div class="controls">
<input type="text" class="input" name="parent2" id="parent2"
placeholder="<?php echo _("Parent 2"); ?>">
</div>
</div>
<div class="control-group form-inline">
<label class="control-label" for="parent_email"><?php echo _("Parent's Email"); ?></label>
<div class="controls">
<input type="email" class="input" name="parent_email" id="parent_email">
</div>
</div>
<div class="control-group form-inline">
<label class="control-label" for="notes"><?php echo _("Notes"); ?></label>
<div class="controls">
<div class="container-fluid" style="padding: 0;">
<div class="row-fluid">
<textarea name="notes" id="notes" class="span12"
style="max-width: 500px"
placeholder="<?php echo _("Notes"); ?>"></textarea>
</div>
<div>
</div>
</div>
<div class="form-actions">
<input type="submit" class="btn btn-primary btn-large" value="<?php echo _("Create Record"); ?>" />
<button class="btn btn-large" href="register.php"><?php echo _("Cancel"); ?></button>
</div>
</fieldset>
</form>
</div>
</div>
<script src="resources/js/dFilter.js"></script>
<script src="bootstrap/js/jqBootstrapValidation.js"></script>
<script>
function showAge(ind) {
document.getElementById('age').innerHTML = "Age: "+
getAge($('#dob').attr('value'));
}
function getAge(a) {
a = new Date(Date.parse(a.replace(/-/g, "/")));
var b = new Date,
years = b.getYear () - a.getYear (),
months = b.getMonth() - a.getMonth(),
days = b.getDate () - a.getDate ();
if (b <= a) return "Invalid DOB."
months < 0 && (years --, months + 12);
days < 0 && (months--, days += 31);
months < 0 && (years --, months = 11);
a = [], b = function(b, c) {
b > 0 && a.push(b + c + (b > 1 ? "s" : "")) }
b(years , " year" );
b(months, " month");
b(days , " day" );
a.length > 1 && (a[a.length - 1] = "and " + a[a.length - 1]);
return(!a.length ? "0 days" : "" ) +
a.join(a.length > 2 ? ", " : " ") + " old."
}
</script>
<link href="resources/css/Jcrop.min.css" rel="stylesheet">
<script src="resources/js/jquery.Jcrop.min.js"> </script>
<script src="resources/js/canvas_toblob.js"> </script>
<script src="resources/js/jquery.getparams.js"> </script>
<script type="text/javascript">
$(function(){
//$("input,select,textarea,checkbox").not("[type=submit]").jqBootstrapValidation();
var cropper = null; // jcropper instance
var selectcenter = function() {
var bounds = cropper.getBounds(); // [width, height]
var w = Math.floor(bounds[0]);
var h = Math.floor(bounds[1]);
if (w < h) { //tall image
var o = Math.floor((h - w) / 2);
return [0, o, w, o + w];
} else if (h < w) { // wide image
var o = Math.floor((w - h) / 2);
return [o, 0, o + h, h];
} else {
return [0, 0, w, w];
}
}
var selectcenter = function() {
var bounds = cropper.getBounds(); // [width, height]
var w = Math.floor(bounds[0]);
var h = Math.floor(bounds[1]);
if (w < h) { //tall image
var o = Math.floor((h - w) / 2);
return [0, o, w, o + w];
} else if (h < w) { // wide image
var o = Math.floor((w - h) / 2);
return [o, 0, o + h, h];
} else {
return [0, 0, w, w];
}
}
var getcroppedphoto = function(callback) {
var canvas = $("<canvas>")[0];
var selection = cropper.tellSelect();
var x = Math.floor(selection.x);
var y = Math.floor(selection.y);
var s = Math.floor(selection.w);
if (s == 0) { //extra safety
var ns = selectcenter();
x = ns[0];
y = ns[1];
s = ns[2];
}
canvas.width = 480;
canvas.height = 480;
canvas.getContext("2d").drawImage($("#photopreview")[0], x, y, s, s, 0, 0, 480, 480);
canvas.toBlob(callback);
}
var resetjcrop = function() {
cropper && cropper.destroy();
$("#photopreview").attr("src", "photo.php")
$('#photopreview').Jcrop({
"aspectRatio" : 1,
"boxWidth" : 250,
"boxWidth" : 250,
"onRelease" : function() {
this.setSelect(selectcenter());
},
}, function() {
cropper = this;
this.setSelect(selectcenter());
});
}
resetjcrop();
$("#photoinput").on("click", function() {
var filereader = new FileReader();
filereader.onload = function(e) {
$("#photopreview")[0].src = e.target.result;
cropper.setImage(e.target.result, function() {
this.setSelect(selectcenter());
});
}
$("#fakefileinput").val(this.files[0].name);
filereader.readAsDataURL(this.files[0]);
});
//append resized image blob to formdata before submitting
//https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest/FormData/Using_FormData_Objects
var disablesubmit = false;
$("form[name=details]").submit(function(e) {
if (!disablesubmit) {
disablesubmit = true;
$("form[name=details] input[type=submit]").attr("disabled", true);
var fd = new FormData(document.forms.namedItem("details"));
getcroppedphoto(function(file) {
fd.append("photo", file);
$.ajax({
url: $("form[name=details]").attr("action"),
type: "POST",
data: fd,
processData: false,
contentType: false
}).done(function(data) {
if (data.success) {
$("#successalert span").html("Successfully registered <a href=\"details.php?id=" + data.id + "\"> " + data.name + "</a>");
$("#successalert").show();
$("form[name=details]")[0].reset();
resetjcrop();
document.body.scrollTop = document.documentElement.scrollTop = 0;
}
}).always(function(data) {
disablesubmit = false;
$("form[name=details] input[type=submit]").attr("disabled", false);
});
});
}
e.preventDefault();
return false;
});
});
</script>
<?php require_once "template/footer.php"; ?>
最佳答案
您绝对不应该使用自定义清理方法将用户输入连接到 SQL 代码。 PDO 提供了一种以非常简单、详尽且明确的方式执行此操作的方法。
另外,使用事务和另一个 PDO 函数来检索最后插入的 ID。
$dbh->beginTransaction();
$sql = 'INSERT INTO data (
name, lastname, phone, mobileCarrier, paging, grade, dob, activity,
room, medical, parent1, parent2, parentEmail, notes, visitor,
joinDate, lastSeen, lastModified, count, picture
) VALUES (
:name, :lastname, :phone, :mobileCarrier, :paging, :grade, :dob, :activity,
:room, :medical, :parent1, :parent2, :parentEmail, :notes, :visitor,
:joinDate, :lastSeen, :lastModified, :count, :picture
)';
$sth = $dbh->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));
$sth->execute(array(
':name' => $_POST['name'],
':lastname' => $_POST['lastname'],
':phone' => $_POST['phone'],
':mobileCarrier' => (isset($_POST['mobileCarrier']) ? '1' : '0'),
':paging' => $paging,
':grade' => $_POST['grade'],
':dob' => $_POST['dob'],
':activity' => (is_numeric($_POST['activity']) ? $_POST['activity'] : 0 ),
':room' => (is_numeric($_POST['room']) ? $_POST['room'] : 0 ),
':medical' => $_POST['medical'],
':parent1' => $_POST['parent1'],
':parent2' => $_POST['parent2'],
':parentEmail' => $_POST['parent_email'],
':notes' => $_POST['notes'],
':visitor' => 'f',
':joinDate' => date('Y-m-d'),
':lastSeen' => date('Y-m-d'),
':lastModified' => date('Y-m-d H:i:s.u'),
':count' => 0,
':picture' => $photo_ref
));
$lastInsertedId = $dbh->lastInsertId()
$dbh->commit();
关于php - PostgreSQL 查询 mySQL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27158931/
目前我正在构建相当大的网络系统,我需要强大的 SQL 数据库解决方案。我选择 Mysql 而不是 Postgres,因为一些任务需要只读(MyISAM 引擎)而其他任务需要大量写入(InnoDB)。
我在 mysql 中使用如下命令。当它显示表格数据时,它被格式化为一个非常干净的表格,间距均匀且 |作为列分隔符。 SELECT * FROM TABLE_NAME; 当我从 CLI 运行命令时,如下
我知道这个问题之前已经被问过好几次了,我已经解决了很多问题,但到目前为止没有任何效果。 MySQL 试图将自身安装到的目录 (usr/local/mysql) 肯定有问题。关于我的错误的奇怪之处在于我
以下是我的 SQL 数据结构,我正在尝试如下两个查询: Select Wrk_ID, Wrk_LastName, Skill_Desc from Worker, Skill where
我们有一个本地 mysql 服务器(不在公共(public)域上),并希望将该服务器复制到我们拥有的 google 云 sql 实例。我的问题是:1.这可能吗?2.我们的本地服务器只能在本地网络上访问
我有一个表(test_table),其中一些字段值(例如字段 A、B 和 C)是从外部应用程序插入的,还有一个字段(字段 D),我想从现有表(store_table)插入其值,但在插入前者(A、B 和
我想创建一个 AWS RDS 实例,然后使用 terraform 管理数据库用户。因此,首先,我创建了一个 RDS 实例,然后使用创建的 RDS 实例初始化 mysql 提供程序,以进一步将其用于用户
当用户在我的网站上注册时,他们会在我的一个数据库中创建自己的表格。该表存储用户发布的所有帖子。我还想做的是也为他们生成自己的 MySql 用户——该用户仅有权从他们的表中读取、写入和删除。 创建它应该
我有一个关于 ColdFusion 和 Mysql 的问题。我有两个表:PRODUCT 和 PRODUCT_CAT。我想列出包含一些标记为:IS_EXTRANET=1 的特殊产品的类别。所以我写了这个
我想获取 recipes_id 列的值,以获取包含 ingredient_id 的 2,17 和 26 条目的值。 假设 ingredient_id 2 丢失则不获取记录。 我已经尝试过 IN 运算符
在 Ubuntu 中,我通常安装两者,但 MySQL 的客户端和服务器之间有什么区别。 作为奖励,当一个新语句提到它需要 MySQL 5.x 时,它是指客户端、服务器还是两者兼而有之。例如这个链接ht
我重新访问了我的数据库并注意到我有一些 INT 类型的主键。 这还不够独特,所以我想我会有一个指导。 我来自微软 sql 背景,在 ssms 中你可以 选择类型为“uniqeidentifier”并自
我的系统上有 MySQL,我正在尝试确定它是 Oracle MySQL 还是 MySQL。 Oracle MySQL 有区别吗: http://www.oracle.com/us/products/m
我是在生产 MySQL 中运行的应用程序的新维护者。之前的维护者已经离开,留下的文档很少,而且联系不上了。 我面临的问题是执行以下请求大约需要 10 秒: SELECT COUNT(*) FROM `
我有两个位于不同机器上的 MySQL 数据库。我想自动将数据从一台服务器传输到另一台服务器。比方说,我希望每天早上 4:00 进行数据传输。 可以吗?是否有任何 MySQL 内置功能可以让我们做到这一
有什么方法可以使用 jdbc 查询位于 mysql 根目录之外的目录中的 mysql 表,还是必须将它们移动到 mysql 根目录内的数据库文件夹中?我在 Google 上搜索时没有找到任何东西。 最
我在 mysql 数据库中有两个表。成员和 ClassNumbers。两个表都有一个付费年份字段,都有一个代码字段。我想用代码数字表中的值更新成员表中的付费年份,其中成员中的代码与 ClassNumb
情况:我有 2 台服务器,其中一台当前托管一个实时 WordPress 站点,我希望能够将该站点转移到另一台服务器,以防第一台服务器出现故障。传输源文件很容易;传输数据库是我需要弄清楚如何做的。两台服
Phpmyadmin 有一个功能是“复制数据库到”..有没有mysql查询来写这个函数?类似于将 db A 复制到新的 db B。 最佳答案 首先创建复制数据库: CREATE DATABASE du
我有一个使用 mySQL 作为后端的库存软件。我已经在我的计算机上对其进行了测试,并且运行良好。 当我在计算机上安装我的软件时,我必须执行以下步骤: 安装 mySQL 服务器 将用户名指定为“root
我是一名优秀的程序员,十分优秀!