Sunday 21 January 2018

php - Echo result of MySQL SELECT query

I have a MySQL SELECT Query that I would like to echo in
PHP. How would I do this? I have tried everything that is listed on the PHP.net help
center, but I either do not understand it or it is not what I am looking
for.




$sql = "SELECT
gamePlayerCount FROM mpTicTacToe_gameData WHERE gameId = " . $gameId;
$result
=
mysqli_query($mySqlConnection,$sql);
var_dump($result);


I
just tried using var_dump, but it returns bool(false) instead
of the 2 that it should be returning

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...