我有一些php从我的数据库中提取一些数据,在我添加了另一个查询后,我收到此错误:
<?php
require("./core.php");
$id = $_GET["id"];
$query = ($db->query("SELECT * FROM Cube WHERE CubeId='$id'"));
$row = $query->fetch_assoc();
$title = $row["Name"] . " - CubePicker";
$query = ($db->query("CALL GetLatestCubePrice(1, $id)"));
$row = $query->fetch_assoc();
$latestPrice = $row["Price"];
//$CubeInstQuery = ($db->query("call GetCubeInst(1);"));
$CubeInstQuery = ($db->query("SELECT * FROM cubeprice.cubeinst WHERE CubeID = $id;"));
if (!$result) {
throw new Exception("Database Error [{$db->errno}] {$db->error}");
}
$Inst = $CubeInstQuery->fetch_assoc();
echo $Inst["URL"];
这个例外是什么意思?这是我的php:
private void Right_Click(object sender, EventArgs e)
{
using (var ctx = new NORTHWNDEntities())
{
int txBoxId = int.Parse(Id.Text);
var query = (from x in ctx.Employees where x.Employees1.Count >= txBoxId + 1 select x);
List<Employee> emp = query.ToList();
foreach (Employee c in emp)
{
Id.Text = c.EmployeeID.ToString();
FirstName.Text = c.FirstName;
LastName.Text = c.LastName;
DateOfBirth.Text = c.BirthDate.Value.ToShortDateString();
}
}
}
该异常与以前的数据库调用有关。我不知道怎么没有完成以前的查询?我该如何解决这个问题?
谢谢!
编辑:我已经完成了副本中的每个答案,对我来说没有任何作用。