Jump to content

Array from SELECT query


johnrb87

Recommended Posts

cant use ' in a " string for the keyname unless variable name is encapsulated with curly braces. and u missed the removal of the concatenation operator.

all these would be valid

query = mysqli_query($connexion, "SELECT name FROM myusers WHERE myidnum = '".$_SESSION['myid']."'");
query = mysqli_query($connexion, "SELECT name FROM myusers WHERE myidnum = '$_SESSION[myid]'");
query = mysqli_query($connexion, "SELECT name FROM myusers WHERE myidnum = '{$_SESSION['myid']}'");

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.