我正在尝试从数据库中检索一些数据,这些数据需要是得分最高的代理商的前十名.
我的查询:
SELECT AgentScores.agentID,
AgentScores.totalScore,
Agents.firstname,
Agents.lastname
FROM AgentScores
INNER JOIN Agents ON AgentScores.AgentId=Agents.Agent_id
ORDER BY AgentScores.totalScore DESC
LIMIT 10
Run Code Online (Sandbox Code Playgroud)
内连接正在工作.我找到了SELECT TOP 10sql语句,但是......我想要10个代理人得分最高而不是前10个id.正如你所看到的,我正在订购总计.
任何人都有一个线索如何解决这个问题?
错误: Array ( [0] => Array ( [0] => 42000 [SQLSTATE] => 42000 [1] => 102 [code] => 102 [2] => [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Incorrect syntax near 'LIMIT'. [message] => [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Incorrect syntax near 'LIMIT'. ) )
谢谢!
我已经在这个项目上工作了很长一段时间.但现在它在我添加身份后崩溃了.错误如下:
The configuration section 'entityFramework' cannot be read because it is missing a section declaration
我认为这是一些IIS错误,因为这就是页面所说的内容.
我的web.config文件:
<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.5.2" />
<httpRuntime targetFramework="4.5.2" />
</system.web>
<connectionStrings>
<add name="DefaultConnection" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\WebFormsIdentity.mdf;Initial Catalog=WebFormsIdentity;Integrated Security=True" providerName="System.Data.SqlClient" />
</connectionStrings>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701" />
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 …Run Code Online (Sandbox Code Playgroud) 我有一个list具有多个级别的C#,如下所示:
我想在我的视图中做的是显示列表中的所有项目,而不仅仅是父项.我当前代码的结果是:
所以,那些只是父母.
我的看法:
@model IEnumerable<Docks.Base.Models.RootObject>
@{
ViewBag.Title = "Docs Index";
Layout = "~/Views/_Layout.cshtml";
}
<div class="page-wrapper-inside">
<div class="groups">
<div class="group-wrapper">
<h1 class="group-title">Manage Navigation</h1>
<div class="group">
<div class="blocks-wrapper row">
<h1 class="intranet-group-title">Overview</h1>
<table class="table full-width">
<thead>
<tr>
<th>Id</th>
<th>Name</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
<tr>
<td>@Html.DisplayFor(modelItem => item.id)</td>
<td>@Html.DisplayFor(modelItem => item.name)</td>
<td>
@Html.ActionLink("Edit", "Edit", new { id = item.id }) |
@Html.ActionLink("Details", "Details", new { id = item.id }) |
@Html.ActionLink("Delete", "Delete", new { …Run Code Online (Sandbox Code Playgroud) 我正在尝试运行 npm install 命令来安装 Laravel Elixir 和其他与 Gulp 相关的软件包。但是在运行命令时,我收到此错误:
$ npm install --no-bin-links npm WARN optional dep failed, continuing fsevents@1.0.6 npm WARN deprecated lodash@1.0.2: lodash@<2.0.0 is no longer maintained. Upgrade to lodash@^3.0.0 npm WARN optional dep failed, continuing fsevents@1.0.6 npm WARN optional dep failed, continuing fsevents@1.0.6
expect@1.13.4 postinstall c:\xampp\htdocs\liquasource\node_modules\laravel-elixir\node_modules\gulp-phpspec\node_modules\expect node ./npm-scripts/postinstall.js
utf-8-validate@1.2.1 install c:\xampp\htdocs\liquasource\node_modules\laravel-elixir\node_modules\browser-sync\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\utf-8-validate node-gyp rebuild
| c:\xampp\htdocs\liquasource\node_modules\laravel-elixir\node_modules\browser-sync\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "c:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild ) Building the projects in this solution one at a time. …Run Code Online (Sandbox Code Playgroud) 我正在使用Ionic 2和Angular 2的应用程序.现在我正在尝试从API中获取数据并在页面上显示它.
我可以记录数据,我认为这是正确的,但由于某种原因,页面本身没有显示任何内容:
我收到数据的API位于:http://peerligthart.com/grotekerk/v1/api.php/zerken?transform = 1
*ng对我的看法
<ion-content padding>
<h1 *ngFor="let z of zerken">
{{ z.naam }}
</h1>
</ion-content>
Run Code Online (Sandbox Code Playgroud)
调节器
import { Component } from '@angular/core';
import { NavController, PopoverController } from 'ionic-angular';
import { PopoverPage } from '../popover/popover';
import { ZerkenProvider } from '../../providers/zerken';
@Component({
selector: 'page-lijst',
templateUrl: 'lijst.html',
providers: [ZerkenProvider]
})
export class LijstPage {
zerken: Array<any>;
constructor(public navCtrl: NavController, public popoverCtrl: PopoverController, public zerkenProvider: ZerkenProvider) {
this.zerkenProvider.getZerken().subscribe(
data => {
console.log(data.zerken);
this.zerken = …Run Code Online (Sandbox Code Playgroud) asp.net ×2
c# ×2
.net ×1
angular ×1
angularjs ×1
asp.net-mvc ×1
gulp ×1
ionic2 ×1
javascript ×1
laravel ×1
node.js ×1
php ×1
razor ×1
sql-server ×1