All pastes #396168 Raw Edit

tech

public php v1 · immutable
·published 2007-03-15 15:44 UTC
rendered paste body
#this code is supposed to construct a query string with sprintf#i'm testing my functions with count, and both returns 9#but i get this error:#Warning: sprintf() [function.sprintf]: Too few arguments in ...    echo count(getvars($columns));    echo count(c("\'%s\'", $columns));    $query = sprintf("INSERT INTO products VALUES(" . implode(",", c("\'%s\'", $columns)) . ")", getvars($columns));