PHP UPDATE prepared statement

I’m trying to learn the proper way to use prepared statements to avoid SQL injections etc. When I execute the script I get a message from my script saying 0 Rows Inserted, I expect this to say 1 …

% sign in Java’s PreparedStatement

PreparedStatement ps = con.createStatement(“select * from table1 where last_name like ?”); ps.setString(1, “‘%”+lastName+”‘”); Will this work the same as… Statement s = con.createStatement(“select …