Questions tagged [prepare]

A prepared statement is used to execute the same SQL statement repeatedly with high efficiency.

A prepared statement is used to execute the same SQL statement repeatedly with high efficiency.

See documentation for more information.

210 questions
-1
votes
1 answer

Can't create handler inside thread that has not called Looper.prepare() Xposed

I 'm starting with Xposed module and gives me an error I do not understand . Use a ColorPicker to choose a color and then use the module, colorPicker works perfect I then apply the code if I put the color in the code,Color.Black works... …
-1
votes
1 answer

Mysqli login prepared statements

Okay, I haved been maked a register system, but when I tried to make the login system it didn't work. When the user log in with the correct username and password its post "You are now logged in", but when I refresh the site, It says I need to login.…
-1
votes
1 answer

PHP PDOStatement prepare and bindValue methods

why doesn't below code work ? $pdo = new PDO('mysql:dbname=_test;host=localhost','root', ''); $select=$pdo->prepare("SELECT * FROM test WHERE th=:name"); $select->bindValue(":name","1"); print_r($select); when i print $select it results : …
John
  • 15
  • 5
-1
votes
1 answer

undefined method prepare() error after db class was instantiated

I am trying to create a simple user registration class using these section of code below. Database file is required in the user.php class and also instantiated just before using the prepared() method. But I still get an undefined method…
hello
  • 1,168
  • 4
  • 24
  • 59
-1
votes
1 answer

Select results from database not working . I am using the prepare statement

The connection to database is working. The display_all() is the problem. It is not displaying results as it show can someone please help pinpoint where the problems may lie.? I am quite new to php and I have just spent some hours on this but dont…
-1
votes
3 answers

Fatal error: Call to a member function prepare()

I've been looking at this code for ages now and I cant really understand what it want from me. I keep getting the same error message no matter what I try and I've looked through other threads to no avail. The error is Fatal error: Call to a member…
user3019749
  • 81
  • 1
  • 3
  • 9
-1
votes
1 answer

data added with a prepared statement can't be searched with WHERE

Data that I add inside an SQLite3 db using prapared statements are not searchable with WHERE: SELECT Active FROM Users WHERE Username="john" I have a demonstration in PHP that adds data with a prepared and a direct statement and then tries to search…
jsmith6
  • 39
  • 8
-1
votes
1 answer

php - prepare and execute keeps executing without adding new values

This has annoyed me for a while now, I have tried this: $stmt = self::$conn->prepare(" INSERT INTO `database`.`table` ( `facebook_id` , `email` , `first_name` , `last_name` , …
ganjan
  • 7,356
  • 24
  • 82
  • 133
-1
votes
2 answers

Mysql prepare statement - Select

Who can give me an advice? why the query can't to provide me an expected value? Thanks. $mysqli = new mysqli($GLOBALS["mysql_host"], $GLOBALS["mysql_user"], $GLOBALS["mysql_passwd"], $GLOBALS["mysql_database"]); $stmt =…
wing suet cheung
  • 205
  • 2
  • 5
  • 10
-1
votes
1 answer

EXECUTE PREPARE STATEMENT MySQL NOT WORKING

I've been trying to determine what's the problem with the stored procedure that I made in MySQL. I've had no problems in creating it but it's not working when I am trying to call it. The error that the Workbench is displaying is Error Code: 1064.…
-2
votes
2 answers

Binding to class properties and fetching to array - php mysqli bind_result

Im trying something like this: class kategoria { public $IdKat; public $IdKatNad; public $NazwaKat; } function get_cats() { $query = "SELECT IdKat, NazwaKat, OpisKat FROM `kategorie`"; try { $stmt =…
Kamil
  • 13,363
  • 24
  • 88
  • 183
-2
votes
1 answer

How to fix stmt prepare and bind

I am having trouble using this prepare and bind. I have tried the same thing with less variables to bind. I have been successful using prepare with just Fname, Lname, Password, $UserID and using sssi with the bind_param object. Can someone explain…
alstonan25
  • 23
  • 8
-2
votes
1 answer

MYSQL Query not able to pull data from Database

The problem I'm having is that my Query: SELECT * FROM administradores WHERE nombre_administrador=? AND password=? isn't pulling anything out of the database. var_dump shows: public 'affected_rows' => null, public 'insert_id' => null public…
-2
votes
1 answer

Return result from mysql::prepare

Hi this may sound noob but i have recently started working mysqli->prepare() i have a following code and i want to return back the data from my model function to controller so that i can loop through the data how can i do that? function…
ahmad05
  • 438
  • 2
  • 6
  • 23
-2
votes
1 answer

Fatal error: Call to a member function prepare() on a non-object

Question is why is this a non-object. The DB is connected successfully and the table is there as well as the columns. This is my code. 'localhost', 'username' => 'root', 'password' => '', …
1 2 3
13
14