MySQL Forums
Forum List  »  PHP

Re: mysql_insert_id(); returnig 0 Record is added and the field is auto_increment?!!
Posted by: theodor michailow
Date: February 14, 2014 09:12AM

-- Table `mydb`.`clients`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `mydb`.`clients` (
`idclients` INT NOT NULL AUTO_INCREMENT ,
`firstname` VARCHAR(45) NULL ,
`lastname` VARCHAR(45) NULL ,
`service_idservice` INT NOT NULL ,
PRIMARY KEY (`idclients`) ,
INDEX `fk_clients_service1_idx` (`service_idservice` ASC) ,
CONSTRAINT `fk_clients_service1`
FOREIGN KEY (`service_idservice` )
REFERENCES `mydb`.`service` (`idservice` )
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;

hire is the creation of the table

Options: ReplyQuote


Subject
Written By
Posted
Re: mysql_insert_id(); returnig 0 Record is added and the field is auto_increment?!!
February 14, 2014 09:12AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.