I’m trying to add a relationship 1:1 between my Visitor & Contact When run I kept getting Answer In the latest versions of laravel the primary key is biginteger. so you might have to change this $table->integer(‘visitor_id’)->unsigned(); with this $table->bigInteger(‘visitor_id’)->unsigned();
Tag: database
Store variable from SQL Table to use later using PHP
I would like to be able to store a variable from a column to use to update a variable in another column. Here is my code: $sqlPlaceNumber = “SELECT @locationPlace := `$locationPlace` FROM `$…
Trying to compare values from database and php file
I’m having trouble trying to compare my entries in a database with a php file, I have a connection and I’m getting results but I can tell I’m grabbing the whole list of entries and trying to compare …
laravel – difference between foreignId() and unsignedBigInteger()
New to Laravel What is the difference between foreignId() and unsignedBigInteger() while linking tables $table->unsignedBigInteger(‘user_id’); $table->foreignId(‘user_id’); I’ve tried both …
MySQL. Retrieve data from many tables with column in common
I have the following tables in my database. TABLE_AVATAR TABLE_DOCUMENTS My goal is to retrieve all data from all the tables for each employee. TABLE_EMPLOYEES will contain 1 row per record (I need all data), TABLE_AVATAR can hold many rows per record (I only need the newest one (id desc)), and TABLE_DOCUMENTS can hold many rows per record as well
How should I change the database layout of my html form to make it more scalable?
I have a HTML form which sends the results to a database currently. The questions are hardcoded to the html page and I am trying to make the form more scalable, dynamic and flexible. I got suggested …
Connection refused for connecting with MySQL server using php in XAMPP(MacOS)
I am new to database. I was trying to connect mysql server with php code. But I don’t know why I am getting error for connection.(I tried in windows changing the “localhost:8080” to “localhost” and it worked perfectly.) MyCode: Refused Warning: XAMPP Port: Answer localhost:8080 is for you web server. If your MySQL server runs on default settings, use port
keep getting an error while saving data into database in laravel
I am using laravel ver “laravel/framework”: “5.8.*” I want to save the data into database with post request and my post data is I have searched on this many topics but I can’t get any information …
How to build this Laravel Eloquent Query
I want to build a nested array from a simple table with Laravel Eloquent, but i couldn’t. So basically below is a snap shot of my table and this is the array I want to build
How to retrieve data from database and able to edit in summernote editor?
I’m facing a problem and i couldn’t find a solution to solve it. My problem is that i have apply a plugin which called as ( Wysiwyg – summernote editor into my Laravel framework project ) . Everything works fine but when i click on the edit page, the data is unable to retrieve from the database and directly edit