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
vote
1 answer

MySQL SELECT * fails on temporary table created by PREPARE using dynamic column and table names after first pass

MySQL 5.2, CentOS 6.4. MySQL SELECT * fails on temporary table created by PREPARE using dynamic column and table names after first pass, when column name and table name are changed to different values from the first pass. The work-around is to use a…
Michael
  • 413
  • 5
  • 13
1
vote
0 answers

Select * for mysql prepare statement not listing anything

I'm trying to convert a part of code into prepare statements and can't make work the select statement. It doesn't throw an error, it just don't list the items. Instead of displaying the results it says there are no entries (double check and there…
1
vote
2 answers

sqlite_prepare_v2 does not return SQLITE_OK

I have been trying to save highscore into database and have been failing for past week, and I have no clue why it is not working. I keep receiving "Problem with prepare statement" and refuses to insert info into database. I have checked with…
nick.jw.park
  • 199
  • 3
  • 12
1
vote
1 answer

android java mediaplayer Service - how can I know if mediaPlayer is prepared?

I made a binded service with MediaPlayer controls which loads and play back audio. But as it happens, sometimes mediaPlayer.prepare(); is not fast enough and it's not always prepared to playback. So how can I make such method , something like…
user2234594
  • 305
  • 1
  • 10
  • 19
1
vote
1 answer

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

http://steliyanportfolio.zzl.org/ try { $pdo = new PDO ( 'localhost', '869276_amsteljlo', 'st08553813', 'steliyanportfolio_zzl_myportfolio' ); } catch ( PDOException $e ) { exit ( 'Database error.' ); } portfolio php include_once…
1
vote
1 answer

this dynamic sql is working fine from sql command prompt but if executed from sql file then always returns 0, why?

delimiter // drop procedure if exists usp_validateUserLogin; create procedure usp_validateUserLogin(in t varchar(255), in username varchar(255), in password varchar(255),out count int) BEGIN set @r=0; set @tbl=concat('select count(*) into…
Zubair Alam
  • 8,739
  • 3
  • 26
  • 25
1
vote
1 answer

SELECT WHERE with PDO prepare in PHP

I create this table: CREATE TABLE IF NOT EXISTS Users (Id INTEGER PRIMARY KEY, Username TEXT UNIQUE NOT NULL, Password TEXT NOT NULL, Time INTEGER UNIQUE NOT NULL, Timezone INTEGER NOT NULL, Active BOOLEAN NOT NULL); and fill it with several rows.…
jsmith6
  • 39
  • 8
1
vote
1 answer

Warning in PDOStatement: Invalid parameter number

Maybe you can help me with this part of my code. I tried to make it works, but when I try to UPDATE always show me this error: Warning: PDOStatement::execute() [pdostatement.execute]: SQLSTATE[HY093]: Invalid parameter number: number of bound…
asterix_jv
  • 824
  • 1
  • 14
  • 35
1
vote
2 answers

Code to end one batch file with another-can anyone assist?

I have a small batch program i made to run a few batch files. I have it set up to run the files. Just a quick question: I have a prep file to get the files ready for the next batch file. However, the prep file runs in a loop. I made it run in a loop…
Ryan Barber
  • 735
  • 1
  • 6
  • 7
1
vote
0 answers

How to properly use PDO prepare execute statement when inserting a large array

I have a foreach loop setup so that I can insert a huge array (about 200 keys). I admit that I do not fully understand how PDO works but I'm an idiot and reading tons of literature has only made me angry and more confused. In all of the examples I…
1
vote
1 answer

PHP Notice: Trying to get property of non-object

I've been trying for a few days now to fix this part of my PHP code, but nothing seems to be working. I'm basically a super-newb. Pretty much last week I decided to try and make a blog from scratch using PHP. This requires that I learn PHP. So, by…
Homer
  • 45
  • 1
  • 1
  • 3
1
vote
2 answers

MYSQLi prepared insert not working..

I am stuck on mysqli prepare.. and I am all but certain there isn't a mistake in the prepared statement. Yet im getting the "call to non-member object error".. from what I recall this error only occurs if infact there is an error with the…
1
vote
1 answer

MySql PREPARE stmt FROM [function argument] and CURSORs

I have a MySql function, which takes in 3 arguments. The last argument is a query itself, which I can execute with PREPARE(?), at least if it does not have multiple results. I want to loop through all results returned from the PREPARED…
Mike de Klerk
  • 11,906
  • 8
  • 54
  • 76
1
vote
1 answer

Issues between switching two sprites

I'm new to corona sdk and I'm developing a game. My game has big characters and big sprite sheets as well. when testing a game I found that not every time but sometimes when I switch between two sprites it stuck the character and some other…
Infoware
  • 158
  • 2
  • 16
1
vote
1 answer

maven release:prepare IOException

I'm trying to get maven's release plugin working with Perforce. When I run: mvn release:prepare -Dusername=PerforceUser -Dpassword=PerforcePassword I get this output (with some IPs/username/passwords removed): [INFO] Scanning for projects... [INFO]…
Svend Hansen
  • 3,277
  • 3
  • 31
  • 50