Jump to content


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


New guy needs help :P Getting Data From a Row,

Recommended Posts

Okay, Hi I\'m new here ^_^ Nice to meet you\'ll.


Okay Ive been trying to get a good answer since im not soo good with Php/MySQL ive tryed alot, manuels and all those wonderful things and tryed another forum but they don\'t seems to give me the answer I need.


What I\'m trying to do is getting the data from `group`

where username = $username, what ever it is that is in `group` colum of that row, and echo the data,


heres on of the many thing ive tryed and my current code

mysql_result doesnt work gives me that error below:

Warning: Wrong parameter count for mysql_result() in /home/lexdark/public_html/animegenki/forums/tp.php on line 15


My code bellow





<title>Test Page</title>




$chost = \"localhost\";

$cuser = \"lexdark_Saizen\";

$cpassword = \"master\";

$cdatabase = \"lexdark_agenki\";

$conn = mysql_connect($chost, $cuser, $cpassword);

mysql_select_db($cdatabase,$conn) or die(\"Access to the database has been denied, please report this error to admin@lexdark.com\");

// Actual Codes

$fonction = mysql_query (\"SHOW `group` FROM `members` WHERE username = \'Saizen\'\");

$sql = mysql_result($fonction);

echo ($sql);







Thanks for any help u can give me and please make it clear ^_^

Share this post

Link to post
Share on other sites

Try this;


$fonction = mysql_query (\"select group FROM members WHERE username = \'Saizen\'\");

if(mysql_num_rows($fonction) > 0){

$row = mysql_fetch_array($fonction);

do {

echo $row[\'group\'];

$row = mysql_fetch_array($fonction);




Share this post

Link to post
Share on other sites

i found how to stold IT OMG! Im soo happy ^_^


thanks for the help and time provided guys ^_^

have a nice day.

Share this post

Link to post
Share on other sites


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.