Page is a not externally linkable
- Code, Content, and Presentation
-- Databases
---- Requesting help with inserting and reading TEXT data type in MySQL


penders - 5:09 pm on Oct 26, 2011 (gmt 0)


Should be unrelated, but you can delete the first "$row" set:
// You're doing the same below $row=mysql_fetch_array($result);
while ($row=mysql_fetch_array($result)) {


I think that's it (well spotted @rocknbil) - the first call to mysql_fetch_array() returns the first row from the result-set and moves the internal data pointer ahead. The second call, in the while() loop, then attempts to get the second row, but there is none (unless you've run the INSERT a few times) and fails.


Thread source:: http://www.webmasterworld.com/databases_sql_mysql/4379360.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com