Jump to content

can not retrieve ID from DB


manix

Recommended Posts

I'm trying to retrieve an ID from a field but I'm failing to do so, says it's "Undefined index: id in C:\xampp\htdocs\load.php on line 8"

 

there's nothing wrong with the code, anyways here it is:

 

3.while($row = mysql_fetch_assoc($result))
4.{
5.$story = substr($row['story'],0,80)." ...";
6.$sheader = $row['header'];
7.$datetime = $row['datetime'];
8.$id = $row['id']; 
9.}

 

I'm retrieving all other values but the ID.. I suspect it's something wrong with the field parameters in the database:

 

Field: id

Type: int(11)

Null: No

Default: None

Extra: AUTO_INCREMENT

Link to comment
https://forums.phpfreaks.com/topic/240233-can-not-retrieve-id-from-db/
Share on other sites

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.