MJ12
-
Posts
3 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Downloads
Store
Posts posted by MJ12
-
-
You'd want to use a prepared statement
SELECT currency, rank FROM users WHERE name = ? LIMIT 1;
where ? is replaced by the username as a bound variable. An example of this is shown here: https://www.w3schools.com/php/php_mysql_prepared_statements.asp.
-
What language / framework are you using?
Retrieving and displaying data from database
in Coding and Programming
Posted
You'd bind the output of the SQL statement to a variable and then echo it normally, I'd imagine. I haven't written PHP in many years, so you'd probably echo each column out as
echo $row['column_name'];
or something like that.