473,505 Members | 13,696 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

FIXED: PEAR::prepare problem with transactions

HI,

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
- THE PAGE NEVER COMPLETES

SOLUTION:

- 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'));
HOPE THIS HELPS!!
Dario

Jul 17 '05 #1
0 1152

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

Similar topics

0
1865
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...
5
1908
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.
1
1856
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...
0
1543
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...
1
367
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...
2
1696
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...
4
1570
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...
2
9748
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...
0
931
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.
0
7213
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7366
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7471
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5610
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4698
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3187
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1526
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
754
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.