Problem in multi field primary key in database

  1. Subject. I have a table(not the only one) where primary key consists of two columns. May be somebody have a solution, with php form connector. I managed to fix it with beforeUpdate event, running quiery in handler, but framework not making safe values, so hacker can break in, the only thing I used is addcslashes. Many libraries support placeholder for sql values , is it apply to PDO, how?

  2. While first solution is working, ugly, Im still not managed to work dataview with multicolumn primary key.

require_once '';

$form = new FormConnector($conn);

function my_update($data){
	global $conn,$form;

	$form->sql->query("UPDATE meta SET description='{$description}', keywords='{$keywords}' where id={$id} and script='{$script}'");
	//success() marks operation as finished and stops any further action processing

  1. Another problem and workaround, dataview_connector. landing and name are primary key. So I opening different views for each id, and pass it as get parameter
  2. column “value” gives me a problem. Is it best way to define alias?
require_once '';

$data = new DataViewConnector($conn);
if ($data->is_select_mode()) {
	$data->render_sql("Select *, value as text from landing_vars where landing={$id}","name","landing,name,type,text");
} else {
	$data->render_table("landing_vars","landing","landing, name, type, value");