First, I'm not asking how to display all records from a table, but a specific information. I've seen similar questions about how to display all data, but it doesn't help me when it's about choosing specific data and actually showing it on the site.
I'll explain better with an exemple :
I have a table named ressources with three columns: name, x, y.
I have this row: anonymous, 12, 14.
How do I get the x or y value by only knowing the name? I've seen this kind of SQL request:
mysqli_query($connexion,"SELECT * FROM ressources WHERE name = 'anonymous' LIMIT 1");
But my problem here is: how do I display it with echo?
Here's what I mean:
echo "You have " + $x + " cows and " + $y " horses."
while:
$x : x
$y : y
name : anonymous
+inecho "You have " + $x + " cows and " + $y " horses."- I think you come from a JS background. This is "PHP"; use a period. They're two different animals altogether ;)