I have a table field in a MySQL database:
userid INT(11)
So I am calling it to my page with this query:
"SELECT userid FROM DB WHERE name='john'"
Then for handling the result I do:
$row=$result->fetch_assoc();
$id=$row['userid'];
Now if I do:
echo gettype($id);
I get a string. Shouldn't this be an integer?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…