Skip to content

Commit

Permalink
remove default value
Browse files Browse the repository at this point in the history
  • Loading branch information
jpuck committed Nov 5, 2016
1 parent be14fce commit b550b6c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions addStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

$id=$db->lastInsertId();

$statement_join = $db->prepare("INSERT INTO all_streams (event_id,stream_id,channel_id) VALUES (?,?, NULL)");
$statement_join = $db->prepare("INSERT INTO all_streams (event_id,stream_id) VALUES (?,?)");
$statement_join->bindParam(1,$event);
$statement_join->bindParam(2,$id);
$statement_join->execute();
Expand All @@ -39,7 +39,7 @@

$id=$db->lastInsertId();

$statement_join = $db->prepare("INSERT INTO all_streams (channel_id, stream_id, event_id) VALUES (?,?,NULL)");
$statement_join = $db->prepare("INSERT INTO all_streams (channel_id, stream_id) VALUES (?,?)");
$statement_join->bindParam(1,$event);
$statement_join->bindParam(2,$id);
$statement_join->execute();
Expand Down
6 changes: 3 additions & 3 deletions ddl.sql
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ CREATE TABLE `streams` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `all_streams` (
`event_id` int(11) DEFAULT '0',
`stream_id` int(11) DEFAULT '0',
`channel_id` int(11) DEFAULT '0',
`event_id` int(11),
`stream_id` int(11),
`channel_id` int(11),
`date_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
KEY `fk_streams` (`stream_id`),
KEY `fk_events` (`event_id`),
Expand Down

0 comments on commit b550b6c

Please sign in to comment.