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
2
votes
1 answer

Android VideoView fails on prepare; OMX-VDEC reports second instance

The code in question: public class VideoPlayer extends Activity { Bundle bundle; VideoView vv; String type; Uri path; Context mContext; ImageView countImage; @Override public void onCreate(Bundle savedInstanceState)…
MayaPosch
  • 315
  • 8
  • 20
2
votes
1 answer

PHP PDO prepare & execute MySQL UPDATE statement not working - stumped!

I'm working on a super-simple counter for my application. I am able to insert rows using '$date' and '$c' just fine, but updating does not work. This works: $c = 8; $today = date('Y-m-d'); $insert_count = $db->prepare("INSERT INTO COUNTER…
Yev
  • 2,051
  • 9
  • 27
  • 46
2
votes
2 answers

(PDO) UPDATE doesn't update with WHERE variable

My problem here is that as soon as i have WHERE with GuildName it does NOT work. It simply doesnt update anything at all. As soon as i have the id=1 (there are 100 guilds, so setting the id=1 is not an option) it does work. $form =…
pbahmann1
  • 37
  • 11
2
votes
3 answers

MySQL prepare statement using variable

I am using below PHP + MySQL prepare statement to select values from database, passing the variable into the statement using function, however I could not get my wanted result. The problem is I don't know how to using the variable in the prepare…
Nicholas Kan
  • 161
  • 1
  • 3
  • 14
2
votes
1 answer

Swift prepareForSegue to one of many custom ViewControllers

I have a BaseViewController connected to 3 different custom ViewControllers using segues with Identifiers. The BaseViewController has a tableview and based on the data in the tableviewCell, the BaseViewController decides which segue to take to the…
branimal
  • 97
  • 9
2
votes
1 answer

Unable to send an int value between view controller and table view controller in swift

the class PreferencesViewController sends nil through prepare for segue regardless if IBActions are taken or not. It seems that something is wrong in my prepare for segue but I'm not sure. I'm not trying to assign to any label or anything I'm just…
J. Dalton
  • 23
  • 3
2
votes
1 answer

Inserting multiple commands into prepared statement rails

I am using rails 3 and I need to execute raw sql in one of my migration and I need to do it using prepared statement since it is the best way to escape problems which arise due to single, statement or so. Is there a way where in I can execute…
2
votes
3 answers

PHP: How to use prepare on database object?

I have tried for to make a php database connection using a class which finally works. My Class looks like this: class Db { protected static $connection; public function connect() { if(!isset(self::$connection)) { self::$connection =…
Margerite
  • 31
  • 3
2
votes
1 answer

Rails 4 auto test schema not working

I have an app that has been upgraded to rails 4.1.8. I have been hacking around trying to make rails 'automatically manage' my test schema...but, no matter what...I have to manually prepare the test database. Im using MiniTest and Fixtures. Here…
hellion
  • 4,602
  • 6
  • 38
  • 77
2
votes
3 answers

Warning: PDO::prepare() expects parameter 1 to be string, object given

I have been trying to convert a old mysql too pdo as I am trying to learn how pdo works, I have been working on this one file for hours now busting my head and can not figure out what is wrong, and I'm sure its a lot. try{ $check_user_data =…
2
votes
1 answer

Android prepare media player causes UI blocking

Hi I am developing android application in which I have one simple activity which contains button to start new activity. new activity contain surface view to show video. I know that prepare media player work on main thread that's why I use…
nilkash
  • 7,408
  • 32
  • 99
  • 176
2
votes
1 answer

ipn --- pdo error handling

I am using ipn sandbox for checking some processes: $business = $_POST['business']; $receiver_email = $_POST['receiver_email']; $receiver_id = $_POST['receiver_id']; $txn_id = $_POST['txn_id']; $txn_type = $_POST['txn_type']; $verify_sign =…
2
votes
1 answer

vs2012: SQLite: Access violation reading location 0x0000000C

I am implementing SQLite Prepare-Statement in vs2012 using C. I am using this link as a tutorial to capture the processes that are running in my machine every time I run my code. Everything is working fine except that the prepare-statement does not…
hashDefine
  • 1,491
  • 6
  • 23
  • 33
2
votes
1 answer

PHP PDO Prepare & Execute Statement

when I run the function that includes this code I get null returned. Can anybody see my issue? $statement = $connect->prepare("UPDATE pages " . "SET " . "pageTitle = :pageTitle, " . "pageSubTitle = :pageSubTitle, " . "pageContent = :pageContent,…
2
votes
0 answers

How can I stop the MediaPlayer's preparing without ANR?

I'm using MediaPlayer to play online track.But i got the problem: try { mMediaPlayer.reset(); mMediaPlayer.setDataSource(path); mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); …
1 2
3
13 14