snach15 Posted August 4, 2010 Report Share Posted August 4, 2010 (edited) mokos ar elementāru scriptu bet nekas neiznāk :@ tātad kas šeit nav pareizi? gribu izvilkt no tabulas lai rāda katram individuāli savus credītus... <?php // Make a MySQL Connection mysql_connect("localhost", "root", "mana parole") or die(mysql_error()); mysql_select_db("topsite") or die(mysql_error()); $test = mysql_query("SELECT credits FROM users WHERE username = ".$_SESSION['user_username'].""); $test = mysql_fetch_row($test); $test = $test[0]; echo $test; ?> Edited August 4, 2010 by snach15 Quote Link to comment Share on other sites More sharing options...
Леший Posted August 4, 2010 Report Share Posted August 4, 2010 (edited) $test = mysql_query("SELECT credits FROM users WHERE username = '".$_SESSION['user_username']."'"); Pēdiņas. EDIT: Pārliecinies, ka ir session_start(); Edited August 4, 2010 by Леший Quote Link to comment Share on other sites More sharing options...
snach15 Posted August 4, 2010 Author Report Share Posted August 4, 2010 paldies! vis darbojas Quote Link to comment Share on other sites More sharing options...
Kemito Posted August 4, 2010 Report Share Posted August 4, 2010 Uz notepad++ takš viss pa krāsām skaisti dalās, kā nākas, un visu var redzēt :) Quote Link to comment Share on other sites More sharing options...
Леший Posted August 4, 2010 Report Share Posted August 4, 2010 Kemito, šis ir cits variants field = asdf pret field = 'adsf' Editors nebļaus. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.