PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
mohson
Forum Contributor
Posts: 372 Joined: Thu Dec 02, 2004 6:58 am
Location: London
Post
by mohson » Thu Dec 14, 2006 9:21 am
neel_basu wrote: So I Think You have Understood Whats The Actuall Error
That cant be the problem because a value is being assigned.
neel_basu
Forum Contributor
Posts: 454 Joined: Wed Dec 06, 2006 9:33 am
Location: Picnic Garden, Kolkata, India
Post
by neel_basu » Thu Dec 14, 2006 9:28 am
Thats Because its for auto_increment on That Field In MySQL Table
Although You Are Not Passing Any Value Through $org_id MySQL Is Being Incremented Automatically By MySQL (Not By php) When Other values Are being Inserted
mohson
Forum Contributor
Posts: 372 Joined: Thu Dec 02, 2004 6:58 am
Location: London
Post
by mohson » Thu Dec 14, 2006 9:30 am
Ok So how should I fix this?
neel_basu
Forum Contributor
Posts: 454 Joined: Wed Dec 06, 2006 9:33 am
Location: Picnic Garden, Kolkata, India
Post
by neel_basu » Thu Dec 14, 2006 9:33 am
you Have To Use A SQL Command To Get The Leatest Value Of $org_id Through SELECT
mohson
Forum Contributor
Posts: 372 Joined: Thu Dec 02, 2004 6:58 am
Location: London
Post
by mohson » Thu Dec 14, 2006 9:33 am
Ok Now I understand. if I remove org ID from the process file it will still auto increment the ID as this is being done by MYsql and NOT PHP.
Is there any way around this problem, still using your method?
neel_basu
Forum Contributor
Posts: 454 Joined: Wed Dec 06, 2006 9:33 am
Location: Picnic Garden, Kolkata, India
Post
by neel_basu » Thu Dec 14, 2006 9:38 am
neel_basu wrote: you Have To Use A SQL Command To Get The Leatest Value Of $org_id Through SELECT
mohson
Forum Contributor
Posts: 372 Joined: Thu Dec 02, 2004 6:58 am
Location: London
Post
by mohson » Thu Dec 14, 2006 9:39 am
How, can you demonstrate? on my code?
neel_basu
Forum Contributor
Posts: 454 Joined: Wed Dec 06, 2006 9:33 am
Location: Picnic Garden, Kolkata, India
Post
by neel_basu » Thu Dec 14, 2006 9:44 am
Ok Tell Me Which 1 Of This fields Are Unique And Not Being Auto Increamented
org_id, person_id, orgname, web_url, notes
mohson
Forum Contributor
Posts: 372 Joined: Thu Dec 02, 2004 6:58 am
Location: London
Post
by mohson » Thu Dec 14, 2006 9:46 am
only org_id is being auto incremented
neel_basu
Forum Contributor
Posts: 454 Joined: Wed Dec 06, 2006 9:33 am
Location: Picnic Garden, Kolkata, India
Post
by neel_basu » Thu Dec 14, 2006 9:47 am
And Which One Is Unique ??
mohson
Forum Contributor
Posts: 372 Joined: Thu Dec 02, 2004 6:58 am
Location: London
Post
by mohson » Thu Dec 14, 2006 9:52 am
org_ID is being auto incremenetd ad is the ID therefore it is the unique filed all the other fields are manually entered
neel_basu
Forum Contributor
Posts: 454 Joined: Wed Dec 06, 2006 9:33 am
Location: Picnic Garden, Kolkata, India
Post
by neel_basu » Thu Dec 14, 2006 9:58 am
Are There Any Fields That Are Unique But Not Being Auto Increamented
mohson
Forum Contributor
Posts: 372 Joined: Thu Dec 02, 2004 6:58 am
Location: London
Post
by mohson » Thu Dec 14, 2006 10:21 am
only org_id is being auto incremented and it is also the primary key
neel_basu
Forum Contributor
Posts: 454 Joined: Wed Dec 06, 2006 9:33 am
Location: Picnic Garden, Kolkata, India
Post
by neel_basu » Thu Dec 14, 2006 11:11 am
Then Can I Assume That
person_id, orgname, web_url, notes Are All Unique Fields ??
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Thu Dec 14, 2006 11:16 am
Can you do a
Where myTableName is the name of the table we are talking about? There is entirely too much ping-ponging going on with this.