LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-19-2011, 03:14 AM   #16
ANU
Member
 
Registered: Aug 2003
Location: Romania
Distribution: Solaris 10
Posts: 78

Original Poster
Rep: Reputation: 15

i have another problem
seams that some of the old tables have a different content... meaning they have 4 more fields
so i will have some with 8 fields, and some with 12
ill need to place a check... need to figure out how exactly, maybe use the mysql_num_fields
 
Old 04-19-2011, 03:19 AM   #17
ANU
Member
 
Registered: Aug 2003
Location: Romania
Distribution: Solaris 10
Posts: 78

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Ramurd View Post
with auto increments, you don't need the code to fetch the "new_id": you simply insert (without the id) and fetch the new id after insertion.
The code as I wrote it has to be modified a bit, as it did not take auto increments into account, and implemented a way around that.
well i removed the part of the code which was WA for auto-increment, but i dont see why i should fetch the new_id after insertion? seams that it works as it is
hmmmm ... i missed something?

Last edited by ANU; 04-19-2011 at 03:25 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
postfix cannot find existing mysql directory anarxi Linux - Server 2 02-02-2009 06:08 AM
'Verbose' distro for redesign Proszbje Linux - Distributions 1 07-28-2008 07:59 PM
Network Redesign and Software Kristijan Linux - Networking 4 08-23-2006 05:39 PM
connecting and reusing existing mysql permissions/dbs/tables after update deesto *BSD 0 10-29-2005 03:46 PM
Integrate postfix with existing MySQL database EdMeister Linux - Software 0 04-21-2005 04:52 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration