473,382 Members | 1,329 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

FIXED: PEAR::prepare problem with transactions


I spent all this afternoon to solve this problem, so I thought to write
two lines to describe this strange behaviour.....

- I'm using PHP with PEAR:DB package.
- I set autocommit to false
- I prepare a statement
- I execute it


- Use the 'query' method intead of the 'prepare' method. Pass the
'query' method the prepared arguments.

$res =& $DB->query('INSERT INTO person (id,username)VALUES (?, ?)',
array(1, 'Dario'));

Jul 17 '05 #1
0 1146

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Dan Finn | last post by:
usinng php-4.3.4 using this for my configure script; ../configure --with-pear=/usr/local/lib/pear --with-mysql --with-apxs=/usr/sb in/apxs --enable-track-vars --with-mysql-sock=/tmp/mysql.sock...
by: me | last post by:
Recent articles have got me looking at PEAR again. Because it is not always available, is it worth getting tied to? After all, if I write for it and it isn't there, my code won't work.
by: Joe Randstein | last post by:
Hi! I now use the DB classes from PEAR with mysql. Do I still have to use addslashes? I ask, because I get some very strange results, I get slashes in front of every " and they get saved in my...
by: Joe | last post by:
I have just upgrade to php5 and installed pear with gopear.bat on my windows installation. Problem: I get this error when i try to run my cli scripts: Fatal error: main(): Failed opening...
by: SJ | last post by:
Hi, I'd like to pu text fixed fith graphics and equations onto some control. And I don't know which one. I tried to use TRichEdit but its doesn't show graphics and eqation. How can I show these...
by: Brian Henry | last post by:
In C++ you could easily create a fixed with string by creating it with char(50) or so as an example. This made it easy to write data out to a flat file with a fixed width column. What is the best...
by: CES | last post by:
All, I'm sorry for the 2nd stupid question but... I'm trying to fix all of the issues I've had in the past. In the past I've resorted to using a table with the align attributed set to center as...
by: Eric Lindsay | last post by:
Googling suggests that IE7 may support position: fixed; I think this might be handy for some pages I want to do. Does anyone have any comments about whether fixed should be considered for use on...
by: mmr315 | last post by:
hi i have php5.2.3 and apache2.2.4 on win 2000 professional.what changes i have to do to work pear with php.
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.