|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-01-04 06:18 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 08:00:01 2025 UTC |
Description: ------------ When you have array with text index-es(hash) and when you extract this array to variables if some of array columns have null value variable for this column do not clears. For example in code reproduce : if for example column "keyword" is null for some row variable $keyword after extracting do not clears. Reproduce code: --------------- $query = "SELECT a.agent_sid, a.country_sid, a.region_sid, a.keyword, a.agent_frequency_sid, a.last_email, u.email, CONCAT(u.first_name, ' ', u.last_name) as fullname FROM AGENT a INNER JOIN USER u ON a.user_sid=u.user_sid INNER JOIN OBJECT_HISTORY o ON u.object_history_sid=o.object_history_sid WHERE o.object_status_sid=1 AND (a.agent_frequency_sid=2 OR agent_frequency_sid=DAYOFWEEK(DATE_ADD(CURDATE(), INTERVAL -1 DAY))+2) "; $agent_result = query($query);while ($row = mysql_fetch_array($agent_result,MYSQL_ASSOC)) { extract($row); }; Expected result: ---------------- to fech result into array and then to extract array into variables for each row and if cell empty or null variable be empty too. Actual result: -------------- variable do not clears