#### Category : sql-server

I am having errors by implementing XAMPP with SQL Server on my Macbook Pro M1, I am using docker to install SQL Server and XAMPP to serve my Laravel Projects. The problem is when I put extension=sqlsrv.soand extension=pdo_sqlsrv.so in php.inionce restart the Apache the error messages occur like below: [15-Sep-2021 08:34:03 UTC] PHP Warning: PHP ..

I’m using laravel 5.8 with xampp on a Windows server. I use multiple databases and I want to know if it’s possible to export the database (as zip or example.sql ) with a button on my site? For example, my end-user connect to the right DB, hits the export button, and saves DB in my ..

I use Laravel Framework 8.54.0 and livewire. I want to call data for my dropdown form. But I get sqlstate error. Could anyone help me find a way to solve this issue? Model: class Item extends Model { protected $table = ‘item’; protected$primaryKey = ‘idx’; public $timestamps = false; public const CREATED_AT = ‘d_in’; .. Read more I have created a dynamic survey builder application, where the survey creator can choose what question type the question that will be made (either radio, checkbox, text and textarea). The storing of user’s responses are saving correctly EXCEPT on my checkboxes. If the user selected 3 or 2 checkboxes then it will only save 1 .. Read more I’m trying to connect mssql database with php 7.4 and ubuntu 20.04. I installed odbc driver still getting this error. SQLSTATE[IMSSP]: This extension requires the Microsoft ODBC Driver for SQL Server to communicate with SQL Server. Access the following URL to download the ODBC Driver for SQL Server for x64: https://go.microsoft.com/fwlink/?LinkId=163712 (SQL: select distinct [ID], .. Read more So I have a ToDo List and really strange problem. So I have a form where user writes the Title and task description, task description is done as textarea, after that the user presses the submit button and submits the Task, which then redirects user to the "Home page" and displays all pending tasks. The .. Read more I am a student and current building a web application for my project. While trying to host my Laravel application to Heroku my biggest problem at the moment is with the app failing to connect to the MSSQL database, I am using the MSSQL addon for Heroku. it shows the error when I try to .. Read more Laravel: 8.55.0 SqlSrv: 2017 I have a query whose basic structure is like this SELECT [main].* FROM (SELECT TOP 50 [person_view].[person_id] FROM [person_view] GROUP BY [person_view].[person_id] ORDER BY [person_id] ) AS [pagination] LEFT JOIN (SELECT * FROM [person_view]) AS main ON [pagination].[person_id] = [main].[person_id] I accomplish this query using laravel and pagination on the subquery .. Read more Hi about a year ago i built an Content Management System website for my company using PHP and MySql this was to replace a very out of date Microsoft access Content Management System we were using all ways good but the director doesn’t want the database to be online so i have to use MS .. Read more It shows composer autoload include file and syntax error Sourc.. Read more I have one MySQL query which is using LIKE for matching a string with one of my tables columns, and it’s working fine in most of the scenarios. select * from TableName where Column like "%STRING%" But No I have one group of records that have "_0" in it. in this case, I get a .. Read more I want to import data from Excel file to SQL server database using Laravel but I have this error SQLSTATE[22007]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]La conversion d’un type de données nvarchar en type de données datetime a créé une valeur hors limites. (SQL: insert into [users] ([name], [email], [password], [updated_at], [created_at]) NB: when .. Read more I want to delete data through the api but it is showing an error because it is necessary to delete records in the properties table. { "message": "SQLSTATE[23000]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The DELETE statement conflicted with the REFERENCE constraint "FK_Interests_Properties_User". The conflict occurred in database "PORTALESTADAO_CADASTRO", table "dbo.Interests_Properties", column ‘interests_user_id’. (SQL: delete .. Read more I am trying to creating a blog post with Laravel using views (blog.blade.php) inside HTML. The code in my laravel web.php fetches the blog posts from my local mssql server looks as follow (and works): Route::get(‘/blog/{id}’, function($id){ $posts = DB::table(‘blog_posts’)->get(); return view(‘blog’, [‘id’=>$id], [‘posts’=>$posts]); }); In the laravel views dir home.blade.php my code works with .. Read more I need your help, I want to install the SqlServer driver so that I can connect to sqlServer, but I would also like to keep the mySql driver because I want to work on both databases so I tried modifying the Dockerfile to install the Sqlserver driver but it doesn’t work. —————————Environment————————— Laravel 8 avec .. Read more I am currently in the process of moving over my locally made laravel application to the web. I am using cpanel for shared hosting. Currently my app used three different databases. The normal MySQL database, a microsoft azure database, and a microsoft sql server database. Currently I am able to connect to 2 of the .. Read more How can i make this query in Laravel? SELECT GS_CONTRATOS.*,GS_ACESSOS.* from GS_CONTRATOS full outer join GS_ACESSOS on GS_ACESSOS.CONTRATO_ID=GS_CONTRATOS.ID where EMPRESA_ID=’1′ and (WEBUSER=’ec’ or WEBUSER is null) i got my one like this and its not working..$contratos = Contrato::query() ->join(‘GS_ACESSOS’,’GS_ACESSOS.CONTRATO_ID’,’=’,’GS_CONTRATOS.ID’,’full outer’) ->where(‘GS_ACESSOS.WEBUSER’,’=’,$id)->orWhere(‘EMPRESA_ID’,’=’,$emp) ->get([‘GS_CONTRATOS.*’,’GS_ACESSOS.*’]); Sourc..

I am using Laravel with database SQL Server my PHP version is 7.4 and my driver version 5.9. I have a problem if the data is viewed from the Microsoft Management SQL Server database, numeric or decimal data types if we view data in database the result is 0.5, but when in Laravel I retrieve ..

I’m working on a POC to save a file (binary) into SQL Server database. The Laravel documentation don’t have anything related to saving binary to database using Eloquent. Sourc..

I need your help, I’m having problems when migrating table to sql server database, I’ve added the driver in the php/ext folder but when the migration always fails, I don’t forget to change the php.ini file and add extension: php_pdo_sqlsrv.dll but it still fails to migrate please help code PDO::__construct() PS D:kerjaINDOPRIMAERPerpindowire> php artisan migrate ..

I am working on a project which requires Laravel + mssql server. I was trying to build the environment by using laravel sail, and realized that the dockerfile used by sail does not contains drivers for mssql server. This leads to an issue of cannot find driver when doing migrations or other operations trying to ..

I am working on a project which requires Laravel + SQL Server. I was trying to build the environment by using Laravel sail, and realized that the dockerfile used by sail does not contains drivers for SQL Server. This leads to an issue of cannot find driver when doing migrations or other operations trying to ..

I have two models in a Laravel application Ft and Fi. Ft contains the following code: protected $table = ‘ft’; protected$connection = ‘XXX’; protected $keyType = ‘string’; public function lines() { return$this->hasMany(‘AppFi’, ‘ftstamp’, ‘ftstamp’); } Fi contains the following code: protected $table = ‘fi’; In my controller I have the following code Ft::select($fields)->with([‘lines’]) ..
The problem is that I have made a relationship between 3 tables and I want to list the result in the view by grouping it only by barcode. My controller function is as follows; public function index(Request $request){$data = DB::table(‘orderItems as SS’) ->select(DB::raw(‘SS.barcode, MAX(SS.productName) as productName, SUM(SS.quantity) as quantity, COALESCE(NULLIF(MAX(B.salePrice),0), MAX(B.regularPrice)) as unitPrice’)) ->leftJoin(‘products ..
The problem is that I have made a relationship between 3 tables and I want to list the result in the view by grouping it only by barcode. My controller function is as follows; public function index(Request $request){$data = DB::table(‘orderItems as SS’) ->select(DB::raw(‘SS.barcode, MAX(SS.productName) as productName, SUM(SS.quantity) as quantity, COALESCE(NULLIF(MAX(B.salePrice),0), MAX(B.regularPrice)) as unitPrice’)) ->leftJoin(‘products ..