Differences between MySQL and SQL Server I'm an ASP.NET developer who has used Microsoft SQL Server for all my database needs (both at work and for personal projects). I am considering trying out the LAMP stack for some of my personal projects. What are some of the main differences between MySQL and SQL Server? Is using stored procedures a common practice in MySQL? Any advice or resources you'd recommend to help me with the switch? To those who have experience with both, are there any missing features from MySQL? Best answer
undefined
MySQL IN statement using Laravel Im having the user filling checkboxes in my view for each year so that they can query based on selected years. The query is looking for a pH value between a minimum and maximum value. As you can see there can be a variety of different years selected. View @foreach($years as $year) {{ Form::checkbox('selectedYears[]', $year->year) }} {{ $year->year }} @endforeach In my controller i then have something like this: Controller $implodeYears = implode(', ',$input['selectedYears']); DB::select('SELECT samples.*, costumers.* FROM
undefined
Group by month producing error in laravel controller I am trying to execute mysql query SELECT COUNT( * ) FROM `Mytable` WHERE `col1` = 'value' GROUP BY MONTH(Date_time) Laravel statement for the same is : DB::table('Mytable')->where('col1','value')->GroupBy(MONTH('Date_time'))->count(); As query is fine but getting error : Call to undefined function App\Http\Controllers\MONTH() Any suggestion will be helpful Best answer : Instead of: ->GroupBy(MONTH('Date_time')) try ->groupBy(DB::raw("MONTH('Date_time')")) as MONTH() is a mysql function, not laravel function. source :http://stackoverflow.com/questions/41460359/group-by-month-producing-error-in-laravel-controller
undefined
Select and Update in same time and gets displayed I have this query: SELECT MIN(id),CustomerName, Scenario,StepNo,InTransit,IsAlef,runNo,ResponseLength FROM `RequestInfo` WHERE `CustomerName` = 'Hotstar' AND `ResponseContentType` like '%video/MP2T%' AND `RequestHttpRequest` like '%segment%' ; which gives me output like this:- +---------+--------------+----------+--------+-----------+--------+-------+----------------+----------+ | MIN(id) | CustomerName | Scenario | StepNo | InTransit | IsAlef | runNo | ResponseLength | IsActive | +---------+--------------+----------+--------+-----------+--------+-------+----------------+----------+ | 139 | HotStar | SearchTv | 1 | No | No | 1 | 410098 | NULL | +---------+--------------+----------+--------+-----------+--------+-------+----------------+----------+ I want to insert string