Our Scripts Vault contains many game scripts that you can use to create your own game!
public function query( $p_sql ) { $r = true; $sql = $this->dbHandle->real_escape_string( $p_sql ); $this->resultHandle = $this->dbHandle->query( $sql , MYSQLI_STORE_RESULT ); if( ! $this->resultHandle ) { $this->resultHandle->close; $r = false; } return $r; }
$sql = $this->dbHandle->real_escape_string( $p_sql );
<?phprequire ( 'pith/init/init.php' ) ; //load the framework$pith->useDb(); //load the database object$pith->db->creds('normal'); //which connect info to useif( $pith->db->connect() ) { if( $pith->db->query('some sql here') ) { while( $pith->db->fetchRow() ) { //some code here, Ex: $a = $pith->db->row[0] $b = $pith->db->row[1] $c = $pith->db->row[2] } } $pith->db->disconnect(); }?>
$password=" '; DROP TABLE users; ";$sql="SELECT * FROM users WHERE login='$login' AND password='$password'";
Code: [Select]$password=" '; DROP TABLE users; ";$sql="SELECT * FROM users WHERE login='$login' AND password='$password'";If this above works and does not make everything go kaboom then it is OK
<?php$login = 'something';$password=" '; DROP TABLE users; ";$pith->db->query('SELECT * FROM users WHERE login=? AND password=?' , 'ss', $login, $password )?>