我是JSON和JavaScript对象的新手.
我有我在MySQL中创建的存储过程,并希望PHP调用该存储过程.做这个的最好方式是什么?
-MySQL客户端版本:
4.1.11 -MySQL Server版本:5.0.45
这是我的存储过程:
DELIMITER $$
DROP FUNCTION IF EXISTS `getNodeName` $$
CREATE FUNCTION `getTreeNodeName`(`nid` int) RETURNS varchar(25) CHARSET utf8
BEGIN
DECLARE nodeName varchar(25);
SELECT name into nodeName FROM tree
WHERE id = nid;
RETURN nodeName;
END $$
DELIMITER ;
Run Code Online (Sandbox Code Playgroud)
调用getTreeNodeName过程的PHP代码是什么?
我一直在使用MVC 5来学习本教程Entity Framework 6 Code First入门.
当我到达我需要运行程序的部分并单击Student以便程序将创建数据库时,我收到以下错误.

用户代码未处理System.Data.DataException HResult = -2146233087消息=初始化数据库时发生异常.有关详细信息,请参阅InnerException.Source = EntityFramework StackTrace:System.Data.Entity.InternalContext.PerformInitializationAction(Action action)at System.Data.Entity.InternalContext.PerformDatabaseInitialization()at System.Data.Entity.Internal.LazyInternalContext.b__4(InternalContext c)处于System.Data.Entity.Inntial
1.PerformAction(TInput input) at System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action上的System.Data.Entity.InternalContext.Initialize()处的System.Data.Entity.Internal.LazyInternalContext.InitializeDatabase()处的System.Data.Entity.Internal.RetryAction 1 action)位于System.Data.Entity.Internal.Linq.InternalSet的.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType).位于ContosoUniversityFollow.Controllers.StudentController的1.Initialize() at System.Data.Entity.Internal.Linq.InternalSetSystem.Data.Entity.Infrastructure.DbQuery1.System.Collections.Generic.IEnumerable<TResult>.GetEnumerator() at System.Collections.Generic.List1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)的1.GetEnumerator() .Index()位于c:\ Users\Office\Documents\Visual Studio 2013\Projects\ContosoUniversityFollow\ContosoUniversityFollow\Controllers\StudentController.cs:第21行,位于System.Web.Mvc的lambda_method(Closure,ControllerBase,Object []). ActionMethodDisp System.Web上System.Web.Mvc.Async.AsyncControllerActionInvoker.ActionInvocation.InvokeSynchronousActionMethod()的System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext,IDictionary2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2参数)的atcher.Execute(ControllerBase控制器,Object []参数)System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult中的.Mvc.Async.AsyncControllerActionInvoker.b__36(IAsyncResult asyncResult,ActionInvocation innerInvokeState)2.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase1.End()在System.Web.Mvc.Async.AsyncResultWrapper.End [TResult](IAsyncResult asyncResult)在System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult的asyncResult)在System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.b__3c()在System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters,对象标签).< > c__DisplayClass45.b__3e()InnerException:System.Data.Entity.Core.EntityException HResult = -2146233087 Message =基础提供程序在Open上失败.Source = EntityFramework …
sql-server-express localdb entity-framework-6 visual-studio-2013 asp.net-mvc-5