原始SQL查询是这样的;
SELECT id,post_title,post_date FROM wp_posts,其中id =’1′
原文链接:https://www.f2er.com/php/130569.htmlSELECT id,post_title,post_date FROM wp_posts,其中id =’1′
当我找回记录时,我发现了它但是当它返回结果时,我很困惑.这是我被卡住的地方.
while ($row = MysqL_fetch_assoc($RS)) : print_r ($row); list($id,$post_title,$post_date) = $row; endwhile;
print_r($row)输出这个;
数组([ID] => 1 [post_title] => Hello world![post_date] => 2012-03-27 03:28:27)
当我在那里运行list函数时(显然是出于调试目的),我得到了这个;
Notice: Undefined offset: 2 in F:\inetpub\wwwroot\whatever\sql.PHP on line 147 Notice: Undefined offset: 1 in F:\inetpub\wwwroot\whatever\sql.PHP on line 147 Notice: Undefined offset: 0 in F:\inetpub\wwwroot\whatever\sql.PHP on line 147
是什么导致了这个?