0
當我在mySQL Workbench中使用相同的請求時,結果的計數是41100. 在我的腳本中,count是1015.我的代碼沒有錯誤(我使用die來查看它)。 這種差異的原因是什麼?Perl dbi:fetchrow_array限制結果:
# Create the statement
# select all id in table contacts
$statement = "select distinct contacts.id from $database.contacts";
# Prepare and execute the SQL query
$sqlQuery = $connectGrc->prepare($statement)
# Execute the statement
$sqlQuery->execute()
# Make id in array
while($oneId = $sqlQuery->fetchrow_array())
{
push(@ArrayId,$oneId);
}
沒有什麼明顯的錯誤?它甚至沒有編譯!誰知道他的實際代碼是什麼樣的。 – ikegami