Hi so, I've always used MySQL in PHP - and I've never actually understood the way to use it in PAWN so I've always gone with "easy includes" etc for using MySQL. But I want my code to be "real" for once. I'm aware of how MySQL works and so on but I'd like to know how to like, do that or that using MySQL in PAWN.
I'd appreciate it if anyone would link a tutorial regarding how to i.ex. do these things in PAWN:
Thanks for any links or helps with how to in the example do these things in PAWN.
Note if it does any change: I'll be using R41-2 Win.
I'd appreciate it if anyone would link a tutorial regarding how to i.ex. do these things in PAWN:
PHP Code:
$query = "SELECT * FROM users LIMIT 10";
if ($result = $mysqli->query($query)) {
while ($row = $result->fetch_assoc()) {
echo "ID: " . $row["id"] . " - Username: " . $row["username"];
}
$result->free();
}
PHP Code:
$query = "SELECT * FROM users WHERE username = 'idk';";
$result = $mysqli->query($query);
$row = $mysqli->fetch_assoc($result);
PHP Code:
$query = "INSERT INTO users SET password = '" . $mysql->escape_string($pw) . "';";
$mysqli->query($query);
Note if it does any change: I'll be using R41-2 Win.