Sqlite re populating a Table and using a If statement

When I check the console for the product of the print statement for print(numbers[2].entry4) I get 4 yet when I do the if       numbers[2].entry4 == 4 then

                 print( 10000 )

                else 

               print(20000)

               end

I Get 20000 I don’t understand why its not 10000

Thank you for your time.

Heres my code 

require “sqlite3”

local path = system.pathForFile( “data.db”, system.DocumentsDirectory )

local db = sqlite3.open( path )  

numbers = {} 

for row in db:nrows(“SELECT * FROM  test”) do

print (“ROW” … row.id )

numbers [#numbers + 1] = 

 {

entry1= row.entry1,

entry2= row.entry2,

entry3= row.entry3,

entry4= row.entry4,

entry5= row.entry5,

entry6= row.entry6

}

end

print(numbers[2].entry4)

if numbers[2].entry4 == 4 then

print( 10000 )

else 

print(20000)

end

Still can’t seem to understand why the if statement won’t work any ideas?

Still can’t seem to understand why the if statement won’t work any ideas?