Skip to content
Advertisement

Tag: mysql

Laravel seeder for table that is hardcoded

I have several tables in my database that are simply used for reference in my application. For example, a table that has two columns, State and State Abbreviation, and has all 50 states and their abbreviations as rows. I want to write seeders for these tables in Laravel, since I want these tables to exist when I start a new

Large value of max connections in mysql will affect the site performance?

My website is having 5000+ users daily. So I changed mysql max connection in server as follows and I edited my.conf file also. Now I feel like my site is loading very slow . Will this affect the site loading time ? Please clarify my doubt . Thanks in advance Answer Before you increase the connections limit, you will want

Laravel Database Schema, Nullable Foreign

I’ve these two database tables: User Tables Partner Tables User Tables will handle this kind of informations While Partner Tables will contains all the user meta information such as first name and last name, etc. When a user is register to the site I only want few fields which are, username, email address, password, first name and last name. These

php replace array value

I have following mysql query function: I get an array of objects with multiple keys: I am sending the whole array to the js via ajax. However, I want to change the date format to “ago” and send it to js. I have the “ago” function, but I am not sure how to target the date value and put it

MySQL select user motto

I am stuck on this problem and I have been trying to solve for like 2 hours. I have a posts table which contains all posts. Each post has a column called ownerid which keeps the id of the owner of this post. And it also contains a column called groupid. What I want to have is to select all

Post date format and select date format from the database

I have a textbox that displays the current date in format: d-m-Y When I save this the date will written to my database like: Y-m-d. For example: the current date is: 02-06-2016. My script writes this to the database as: 2002-06-16. I am using the following code to save the data to my database: What do I need to change

Advertisement