Printing some results on screen when submit is selected

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 »

neel_basu wrote:So I Think You have Understood Whats The Actuall Error
That cant be the problem because a value is being assigned.
User avatar
neel_basu
Forum Contributor
Posts: 454
Joined: Wed Dec 06, 2006 9:33 am
Location: Picnic Garden, Kolkata, India

Post by neel_basu »

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 »

Ok So how should I fix this?
User avatar
neel_basu
Forum Contributor
Posts: 454
Joined: Wed Dec 06, 2006 9:33 am
Location: Picnic Garden, Kolkata, India

Post by neel_basu »

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 »

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?
User avatar
neel_basu
Forum Contributor
Posts: 454
Joined: Wed Dec 06, 2006 9:33 am
Location: Picnic Garden, Kolkata, India

Post by neel_basu »

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 »

How, can you demonstrate? on my code?
User avatar
neel_basu
Forum Contributor
Posts: 454
Joined: Wed Dec 06, 2006 9:33 am
Location: Picnic Garden, Kolkata, India

Post by neel_basu »

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 »

only org_id is being auto incremented
User avatar
neel_basu
Forum Contributor
Posts: 454
Joined: Wed Dec 06, 2006 9:33 am
Location: Picnic Garden, Kolkata, India

Post by neel_basu »

And Which One Is Unique ??
mohson
Forum Contributor
Posts: 372
Joined: Thu Dec 02, 2004 6:58 am
Location: London

Post by mohson »

org_ID is being auto incremenetd ad is the ID therefore it is the unique filed all the other fields are manually entered
User avatar
neel_basu
Forum Contributor
Posts: 454
Joined: Wed Dec 06, 2006 9:33 am
Location: Picnic Garden, Kolkata, India

Post by neel_basu »

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 »

only org_id is being auto incremented and it is also the primary key
User avatar
neel_basu
Forum Contributor
Posts: 454
Joined: Wed Dec 06, 2006 9:33 am
Location: Picnic Garden, Kolkata, India

Post by neel_basu »

Then Can I Assume That
person_id, orgname, web_url, notes Are All Unique Fields ??
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Can you do a

Code: Select all

SHOW CREATE TABLE `myTableName`;
Where myTableName is the name of the table we are talking about? There is entirely too much ping-ponging going on with this.
Post Reply