未配置SQL方言(Phpstorm)

时间:2015-05-23 10:48:34

标签: php mysql mysqli localhost

大家好我正在研究Google oauthorization2,我遇到“SQL方言未配置”的问题,这就是为什么我的查询没有执行而数据要转到表请帮帮我。

下面我列出了遇到问题的两个查询!

工具: PhpStorm 8+ MySQL的 Localhost

       override func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
    let cell = collectionView.dequeueReusableCellWithReuseIdentifier(PhotoBrowserCellIdentifier, forIndexPath: indexPath) as! PhotoBrowserCollectionViewCell
    let sharedImageCache = FICImageCache.sharedImageCache()
    cell.imageView.image = nil
    let button   = UIButton.buttonWithType(UIButtonType.System) as! UIButton
    button.frame = CGRectMake(90, 90, 15, 15)
    button.backgroundColor = UIColor.greenColor()

    //cell.contentView.addSubview(button)
    let photo = photos[indexPath.row] as PhotoInfo
    if (cell.photoInfo != photo) {

        sharedImageCache.cancelImageRetrievalForEntity(cell.photoInfo, withFormatName: formatName)

        cell.photoInfo = photo

       // cell.contentView.addSubview(button)

    }
    sharedImageCache.retrieveImageForEntity(photo, withFormatName: formatName, completionBlock: {
        (photoInfo, _, image) -> Void in
        if (photoInfo as! PhotoInfo) == cell.photoInfo {
           // cell.imageView.image = image
            var imgView = UIImageView(image:image!)
            imgView.frame = CGRectMake(0,0,cell.frame.size.width, cell.frame.size.height);
            cell.contentView.addSubview(imgView)

            cell.contentView.addSubview(button)
        }
    })

    return cell
}


  override func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
    let photoInfo = photosVideo[indexPath.row]
    var url = photoInfo.sourceImageURL
           button.addTarget(self, action: "showNotice", forControlEvents: UIControlEvents.TouchUpInside)
    performSegueWithIdentifier("show photo", sender: ["photoInfo": photoInfo])
    println("hello")
}

2 个答案:

答案 0 :(得分:97)

前往File > Settings > Languages & Frameworks > SQL Dialects并为整个项目设置。

答案 1 :(得分:66)

这是如何在设置中执行此操作的屏幕截图: enter image description here

这是2016.3版本