遇到一个需求,需要修改数据库中所有包含email的字段的表,要把里面的长度改为128位.Laravel获取所有的表,然后循环判断表里面有没有email这个字段.代码如下: use Illuminate\Support\Facades\Schema; use DB; public function getDatabaseColumns() { $tables = DB::select('show tables'); $tables = array_column($tables, 'Tables_i
public class Person { public string Name{get;set;} public string Phone{get;set;} } view层 @model Model.Person @{ ViewBag.Title = "Add";} @using (Html.BeginForm("doAdd","person",FormMethod.Post) { } 1.通过request.form获取表单数据 pu
$.fn.GetPostData = function () { var data = {}; var k = false; $(this).find(".datacontrol").each(function (i, value) { var field = $(value).attr("name"); if (field == null) { field = $(value).attr("id"); } if (value.tagName =