Answers for "one time insert and other time update"

SQL
0

one time insert and other time update

$sql = "INSERT INTO " .PHOTOS_TABLE. "
        (
            photo_name,
            photo_date,
            photo_proper,
            photo_size,
            album_id
        )
        VALUES
        (
            '" .addslashes($photo_name). "',
            " .time(). ",
            '" .addslashes($key_name). "',
            " .intval($size). ",
            " .$album. "
        )";
        
    
$update_query="UPDATE albums set count=count+'1' where condition"; // total will be updated to total+number of new puppies added.

mysql_query($update_query);
Posted by: Guest on April-05-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language