Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

RE: [PHP-DB] Transaction suddenly not working
> --- "Ford, Mike" <M.Ford@leedsmet.ac.uk> wrote:
 

> Mike are you saying that I should put single quotes
> around all values regardless of the type ?
> The double commas are happening because around an int
> I don't use 'value' the single quotes . ?

Don't know about other database engines, but in MySQL, it doesn't matter
if an int is inserted as a string, i.e., with the quotes. My recollection
is that MySQL handles the type conversion internally. So, assuming you are
validating the entries before inserting, if a value is missing, assign to
it ''. Whatever the field has as a default value will then be inserted
into the table.

dave

Report this thread to moderator Post Follow-up to this message
Old Post
dpgirago@mdanderson.org
11-29-04 08:59 PM


RE: [PHP-DB] Transaction suddenly not working
--- dpgirago@mdanderson.org wrote:
 

> Don't know about other database engines, but in
> MySQL, it doesn't matter
> if an int is inserted as a string, i.e., with the
> quotes. My recollection
> is that MySQL handles the type conversion
> internally. So, assuming you are
> validating the entries before inserting, if a value
> is missing, assign to
> it ''. Whatever the field has as a default value
> will then be inserted
> into the table.
>
> dave

Well most of these fields are optional and in the db
set to allow null.  I went ahead and put '' around all
the values so just in case.  Though I know for a fact
it was working without them before.
Oh and yes it seems to be working now.
Stuart

Report this thread to moderator Post Follow-up to this message
Old Post
Stuart Felenstein
11-29-04 08:59 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP DB archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:51 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.