What does a colon in a MySQL statement mean?
Reply to discussion (solution)
$db->bandvars (); Passing values
echo $check _query; Will know.
Can look at the brochure PDO class
Prepare (' SELECT name, colour, calories from fruit
There is no other meaning in the notation, so that it differs from the syntax component of SQL
The Bindvars method associates the defined symbol with the actual variable.
Example #1 Execute A prepared statement with named placeholders
prepare (' SELECT name, colour, calories from F Ruit WHERE calories <: calories and colour =: Colour '); $sth->bindparam (': Calories ', $calories, PDO::P aram_int ); $sth->bindparam (': Colour ', $colour, PDO::P aram_str,); $sth->execute ();? >example #2 Execute A prepared statement with question mark placeholders
prepare (' SELECT name, colour, calorie s from fruit WHERE calories <? and colour =? '); $sth->bindparam (1, $calories, PDO::P aram_int), $sth->bindparam (2, $colour, PDO::P aram_str, N); $sth Execute ();? >
Big God, the following MySQL statement is used to query the ranking, in MySQL can be executed, but the S2SH framework is not, can you point it out?
Select T.*, @rownum: = @rownum +1 as RowNum
From (SELECT sum (Yjb_yji) as total,yyryusername,yjb_yyry_id
From YJB where month (createtime) =month (now ()) and year (Createtime) =year (now ())
Group BY yjb_yyry_id ORDER BY total desc) T, (SELECT @rownum: =0) r
Reported this bug:org.hibernate.QueryException:Space is not allowed after parameter prefix ': '