navid3d_69
جمعه 10 آذر 1391, 11:34 صبح
سلام من میخوام توی این کلاس اگر این $Shomare_Factor قبلا مقدار id رو در خودش ذخیره کردن بود دیگه اون متد اجرا نشه باید چی کار کنم؟
class invoice{
public $Shomare_Factor;
public function Getid(){
$firstinsert = mysql_query("INSERT INTO invoice (Name) values('')");
if($firstinsert == true){
$this->Shomare_Factor = mysql_insert_id();
}
}
class invoice{
public $Shomare_Factor;
public function Getid(){
$firstinsert = mysql_query("INSERT INTO invoice (Name) values('')");
if($firstinsert == true){
$this->Shomare_Factor = mysql_insert_id();
}
}