fetch array problems.
| From: | John Starkey | Date: | Wed, 28 Mar 2001 08:08:35 +0000 |
| Subject: | fetch array problems. | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-7923@lists.php.net to get a copy of this message | ||
Hello all.
Can someone tell me what I'm doing wrong here?
$sql = "SELECT * FROM user_prefs WHERE u_id='$UserID'";
$result = mysql_db_query($sql);
$color = mysql_fetch_array($result);
echo '
<table bgcolor="'.$color[color_1].'" class="nav"> ......
';
I can't get $color[color_1] to return a value. It's in the db and
color_1 is a valid table containing a hex value. This is my first
attempt at using assoc. arrays.
Thanks,
John