好吧,既然你没有使用编程语言,并且只有mysql
,你的所有属性都将显示在控制台窗口的查询结果中。
编辑:
要访问您的查询和结果,请参阅PHP.net网站的以下文章:http://www.php.net/manual/en/mysqli-result.fetch-assoc.php
<?php
$mysqli = new mysqli("localhost", "my_user", "my_password", "world");
/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
$query = "SELECT Name, CountryCode FROM City ORDER by ID DESC LIMIT 50,5";
if ($result = $mysqli->query($query)) {
/* fetch associative array */
while ($row = $result->fetch_assoc()) {
printf ("%s (%s)\n", $row["Name"], $row["CountryCode"]);
}
/* free result set */
$result->free();
}
/* close connection */
$mysqli->close();
?>
/EndEdit中
先解决最新的,假设您有id
列,请使用ORDER BY
:
SELECT * FROM 'transactions' WHERE 'userid'=20 ORDER BY id DESC LIMIT 0,3;
我正在使用它与PHP。 –
阅读http://www.php.net/manual/en/mysqli-result.fetch-assoc.php –