We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 114b617 commit bdee356Copy full SHA for bdee356
ssql.php
@@ -561,8 +561,19 @@ private function getParameters(array $columns, string $name, $primary = NULL) {
561
else
562
$r[] = "`{$cname}` {$t}({$s}) {$n}{$d}{$o}{$a}";
563
};
564
- if($name!="add" && $primary)
565
- $r[] = "PRIMARY KEY (`{$this->escape($primary)}`)";
+ if($name!="add" && $primary!==NULL) {
+ if(is_array($primary)) {
566
+ if(count($primary)==0)
567
+ return $r;
568
+ $keyString = "PRIMARY KEY (";
569
+ $keyString.= $this->escape(array_shift($primary));
570
+ foreach($primary as $k2 => $v2)
571
+ $keyString.= ", `" . $this->escape($v2) . "`";
572
+ $keyString.= ")";
573
+ }
574
+ else
575
+ $r[] = "PRIMARY KEY (`{$this->escape($primary)}`)";
576
+ };
577
return $r;
578
}
579
0 commit comments