You are here: Re: Prepared Statment seems to run but doesn't affect database « PHP Programming Language « IT news, forums, messages
Re: Prepared Statment seems to run but doesn't affect database

Posted by toomanyjoes on 07/13/06 18:54

Andy,

Thanks for your reply. Autocommit is turned on. I'm not too
familiar with that function or what you mean by a rollback, but since
it is on I am not sure what to do.


Andy Hassall wrote:
> On 13 Jul 2006 08:38:15 -0700, toomanyjoes@gmail.com wrote:
>
> >I have written a function that runs a prepared statement and it seems
> >to run just fine but when I check to see the affected rows nothing is
> >affected. Can someone take a look at my code and tell me if they notice
> >anything wrong outright.
> >
> >[CODE BLOCK for config.php]
> >function QueryDB_mysqli($query, $typeStr, $varStr){
> >$db_connection = new mysqli(DB_HOST, DB_USER, DB_PASSWORD,DB_DATABASE);
> >$statement = $db_connection->prepare($query);
> >$statement->bind_param($typeStr, $varStr);
> >$statement->execute();
> >$statement->close();
> >exit();
> >}
>
> Is autocommit on or off? If off, it's probably doing a rollback at end of
> script.
>
> --
> Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
> http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация