PHP å ¬å¼ããã¥ã¢ã«ã® SQL ã¤ã³ã¸ã§ã¯ã·ã§ã³ã®ãã¼ã¸ã«ã¯æ°å¤ã®æ±ãæ¹ããã¡ãã¨æè¨ããã¦ããã ã¢ããªã±ã¼ã·ã§ã³ããæ°å¤å ¥åãæå¾ ãã¦ããå ´åããã¼ã¿ã is_numeric() ã§æ¤è¨¼ãããã settype() ã«ããæé»ã®åå¤æãè¡ããã sprintf()ã«ããæ°å¤è¡¨ç¾ã使ç¨ãããã¨ãæ¤è¨ãã¦ã¿ã¦ãã ããã ãµã³ãã«ã³ã¼ããæ²è¼ããã¦ããã settype($order, 'integer'); $query = "SELECT id, name FROM products ORDER BY name LIMIT 20 OFFSET $offset;"; // ãã©ã¼ãããæååã®%dã«æ³¨æãã¦ãã ããã%sã使ç¨ãã¦ãæå³ãããã¾ããã $query = sprintf("SELECT id, name FROM products ORDER BY name LIMIT 2
{{#tags}}- {{label}}
{{/tags}}