Jump to content

mysql get data issue


bouwob

Recommended Posts

I have this line

 

 

while($row = mysql_fetch_row($result)) 
    { 
    echo "<tr><td>".@$row['year']."</td><td>".@$row['Make']." ".@$row['model']."</td><td>".@$row['number']."</td><td>".@$row['extra']."</td></tr>"; 
    } 
[/php

when I run the query that I am using to get the data here are a few of the results


[code]
CardID  year  Make  number  model  extra  filepath  
      2 1968 Topps 177   RC/J.Koosman RC 0 
      3 1968 Topps 177 Milton Bradley Jerry Koosman 0 

but with the above line I am getting these messages

 

Notice: Undefined index: Make in public_html/findcards/index.php on line 37

Notice: Undefined index: model in public_html/findcards/index.php on line 37

Notice: Undefined index: number in public_html/findcards/index.php on line 37

Notice: Undefined index: extra in public_html/findcards/index.php on line 37

now I can eliminate the messages with an @ but it isnt giving me any data. If I switch $row['year'] with $row[1] it works out fine.

 

what is the deal?

 

tia

Link to comment
https://forums.phpfreaks.com/topic/51419-mysql-get-data-issue/
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.