Initiate Mage
- Joined
- Oct 9, 2015
- Messages
- 1
- Reaction score
- 0
Hi guys, basically. I've just started learning website coding & i bought a source from someone i know. He promised that there won't be any errors and it'll be usable after setting it up. However, sad to say there's a few errors after setting it up. Basically, my website is a CSGO Jackpot website, if it's possible. Please help me on solving these problems, thanks!!
Error 1) mysql_query(): Unknown column 'steamprofile' in 'field list' on line 9
Error 2) mysql_fetch_assoc() expects parameter 1 to be resource, boolean given on line 10.
<?php (LINE 1)
$sitename ="www.xxx.com";(LINE 2)
$link = mysql_connect("ip","root","password");(LINE 3)
$db_selected = mysql_select_db('database',$link);(LINE 4)
mysql_query("SET NAMES utf8");(LINE 5)
function fetchinfo($rowname,$tablename,$finder,$findervalue){(LINE 7)
if($finder =="1")$result = mysql_query("SELECT $rowname FROM $tablename");(LINE 8)
else$result = mysql_query("SELECT $rowname FROM $tablename WHERE `$finder`='$findervalue'");(LINE 9)
$row= mysql_fetch_assoc($result);(LINE 10)
return$row[$rowname];(LINE 11)
}
?>
If this isn't enough to solve the problem, please add me on skype @ kshlalala! Thanks!
EDIT: Also, is there a way to change my name? I login-ed from facebook and there wasn't an option to choose my username. Thanks!
Error 1) mysql_query(): Unknown column 'steamprofile' in 'field list' on line 9
Error 2) mysql_fetch_assoc() expects parameter 1 to be resource, boolean given on line 10.
<?php (LINE 1)
$sitename ="www.xxx.com";(LINE 2)
$link = mysql_connect("ip","root","password");(LINE 3)
$db_selected = mysql_select_db('database',$link);(LINE 4)
mysql_query("SET NAMES utf8");(LINE 5)
function fetchinfo($rowname,$tablename,$finder,$findervalue){(LINE 7)
if($finder =="1")$result = mysql_query("SELECT $rowname FROM $tablename");(LINE 8)
else$result = mysql_query("SELECT $rowname FROM $tablename WHERE `$finder`='$findervalue'");(LINE 9)
$row= mysql_fetch_assoc($result);(LINE 10)
return$row[$rowname];(LINE 11)
}
?>
If this isn't enough to solve the problem, please add me on skype @ kshlalala! Thanks!
EDIT: Also, is there a way to change my name? I login-ed from facebook and there wasn't an option to choose my username. Thanks!