Skip to content
Advertisement

Tag: sql

How do I get a list of all models in Laravel?

I would like to find a list of all models, database tables as a backup, in a Laravel project. I want to do this to build a dashboard that displays the way data in all of the models has changed over time, I.E. if there is a user model, how many users have been added or modified each day for

PHP Dropdown Box from SQL Join

I want to do is have a dropdown box that will display the MealOption and when that is selected somehow find that products meal id? This is my database layout

Broken links after moving wordpress site

I moved my wordpress site from local host to a live server. The problem is that all links from my nav won’t work as the home button. live site url: http://iulian.cablevision.ro broken link example: http://iulian.cablevision.ro/about/ this is the error that i get: I tried to use the a comand in SQL on my database to update urls: And I also

assigning variables to sql query result

Amateur here, just practicing some sql. I am trying to assign php variables to my sql query results, and I thought I saw it work in this fashion, but it doesn’t seem to be working for me: $query1 = …

MySQL show all rows and sum at the end

I’ve read through about 20 different answers regarding this question, but either I’m mis-understanding the answers, or its just not clicking. Here is my situation: I have a table that lists ingredients for a recipe. Columns in the table are: ingredient_id, ingredient_title, ingredient_oz, ingredient_grams, ingredient_lbs (pounds), etc. I want to list each ingredient, then after all ingredients have been listed,

Laravel: getting a single value from a MySQL query

I’m trying get a single value from MySQL database using laravel but the problem I’m getting an array . this is my query result in MySQL command line: my laravel function: expected $data value is a string with value= Admin but what i get is : [{“groupName”:”Admin”}] Answer Edit: Sorry i forgot about pluck() as many have commented : Easiest

Advertisement