Quantcast
Channel: Questions in topic: "die"
Viewing all articles
Browse latest Browse all 115

PHP die/echo with value from table column...

$
0
0
So I am trying to retrieve data from my mySQL database through PHP. I don't know any better way to do this, so I am just simply using the PHP die(String); to return my variable from the table. I have it set up like: $ins = mysql_query("SELECT `hunger` FROM SocietatemStorage WHERE `user` = '$user'"); if($ins) die ($ins); else die ("Query unsuccessful"); Now as you all probably know, this doesn't work. You simply cannot die with a mysql_query variable($ins). I don't know and can't think of any other way to retrieve a variable from my mySQL table/column. I also tried Debug.Logging what this die actually gives, and it gives 'Resource #3'. Any help on the subject, new way of retrieving a variable or fixing this way, is appreciated. Thanks in advance, william9518

Viewing all articles
Browse latest Browse all 115

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>