sprintf

From: Date: Thu, 07 Nov 2002 19:31:26 +0000
Subject: sprintf
Groups: php.general 
Request: Send a blank email to php-general+get-123214@lists.php.net to get a copy of this message
hey I'm trying to make dynamic database queries using sprintf any way I can get around this error? $sql = "SELECT * FROM Vacation where StartDate LIKE '%s/" . '\%' . "/%s'"; $sql = sprintf($sql, $_GET["month"], $_GET["year"] ); I want just a literal slash between the month and year, printf seems to complain of to few arguments I've tried escaping the meaning of the % in the example above and still get errors Thanks TYler

« previous php.general (#123214) next »