Jump to content

[SOLVED] brain fart - please help


dmccabe

Recommended Posts

I am having a memory blank moment.

 

I am running this query

 

			$editnewusers_qry = "SELECT * FROM `tbl_newsusers` WHERE `nuid` = '$nuid' ORDER BY nuid ASC";
			$editnewusers_result = mysql_query($editnewusers_qry);
			$first_name = $editnewusers_result['first_name'];	

 

Works fine apart from the setting a value for $first_name which doesnt contain a value, but should

 

Where am I going wrong now?

Link to comment
https://forums.phpfreaks.com/topic/109872-solved-brain-fart-please-help/
Share on other sites

You have to use one of the mysql fetch functions to get the actual data.

 

<?php
$editnewusers_qry = "SELECT * FROM `tbl_newsusers` WHERE `nuid` = '$nuid' ORDER BY nuid ASC";
$editnewusers_result = mysql_query($editnewusers_qry);
$editnewusers_row = mysql_fetch_assoc($editnewusers_result);
$first_name = $editnewusers_row['first_name'];	
?>

 

Ken

Archived

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

×
×
  • Create New...

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.