I have a variable of logged in user ( $ steamid
) which I need to use Select the specific field from the database and resume I am using the following code, but it is working incorrectly. All database information is correct, tables, columns, and variables are not misspelled. Not sure what I'm doing.
& lt ;? Php $ con = mysqli_connect ("private", "private", "private", "private"); // Check connection if (mysqli_connect_errno ()) {echo "failed to connect to MySQL:". Mysqli_connect_error (); } $ Sql = "select` banale from` asappler` where` steamid` = '$ steam id' "; ($ Result = mysqli_query ($ con, $ sql)) {// Get field information for all fields ($ field_fone = mysqli_fetch_field ($ result)) {printf ("banana:% n", $ field->) ; } // Free results set mysqli_free_result ($ result); } Mysqli_close ($ con); ? & Gt;
No errors are shown, it only "bananas": nothing after this. I think I did not do it correctly, did anybody know what I did wrong? Here is a screenshot of my database table, so that you know what it looks like. Try it out:
$ query = Mysqli_Query ($ con,
if If this does not work, then there is a problem in the format STEAM_ID. You can try trimming the ID in only one number, and STEAM_x: x: can add it later.
< / Html>
No comments:
Post a Comment