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
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

Link to comment
Share on other sites

Most other forums are populated by 13 year old kids waring about which console will give them bigger and better graphics.

 

At PHPFreaks we take kindly on the beginners. And teach them the ancient* art of PHP.

 

 

(*note: PHP may not be ancient)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.