|
-
Aug 25th, 2006, 06:17 AM
#1
Thread Starter
Member
Sql Help
Hi All,
if ($updatecode == 3 ){
mysql_query("UPDATE tblcollection SET status = 3 WHERE barcode = '$barcode'");
}
else{
$rec=mysql_query("select * from tblcollection where barcode='".$barcode."'");
if($row=mysql_fetch_array($rec)){
//update
mysql_query("UPDATE tblcollection SET ( barcode = '$barcode', Title = '$title', Genre = '$genre',Boxsize = '$boxset' ) WHERE '$rec'");
}
else{
//insert
mysql_query("INSERT INTO tblcollection (barcode,Title,Genre,Boxsize) VALUES ('$barcode','$title','$genre','$boxset')");
}
}
I don't know how take id from $rec in
mysql_query("UPDATE tblcollection SET ( barcode = '$barcode', Title = '$title', Genre = '$genre',Boxsize = '$boxset' ) WHERE '$rec'");
Ramesh
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|