Questions tagged as 'mysql'

1
answer

Warning: mysql_fetch_array () expects parameter 1 to be resource, array given

I am currently learning to program in PHP for some tutorials on YouTube from "the newboston" (maybe they know it) and I am in the database part of mySQL. In my program I try to query data from a table in mySQL but it throws me an error that s...
asked by 13.08.2016 / 22:47
1
answer

How to enter a subquery in laravel 5.2

I have this query in mysql SELECT id, name, (SELECT COUNT(id_team_local) FROM seasons WHERE id_team_local = teams.id) AS 'Partidos Jugados' FROM teams and I would like to give Laravel some idea of how I could do it?     
asked by 22.09.2016 / 19:45
0
answers

Foreign key registration

Good morning To start work on laravel 5.5, I have two tables, one where I have an administrative user, and another where voting users are added, when I register a voting user I see this error, SQLSTATE[HY000]: General error: 1364 Field 'us...
asked by 28.09.2018 / 01:58
1
answer

How to save the coordinates of a circle of google maps in the database?

As I can save the coordinates of a circle of google maps in the database, I already load the map and with the function onMapLongClickListener it allows to draw a new circle to the user. Now what I would like to do is to be able to store those va...
asked by 02.07.2016 / 02:25
2
answers

Validate a dynamic Combobox with PHP

Currently I have a dynamic combo where when selecting a State you throw the due Municipality to which that State belongs. What I want is to validate from the server side that the selected municipality actually belongs to that state, since it...
asked by 28.08.2018 / 00:11
3
answers

Search data by selected month php mysql

I have a table in mysql with three fields idPago value mespago. In it I have some data and I want to make a query by mespago, that when selecting the month in the datapicker I show in a table the sum of value only of those that belong to the sel...
asked by 25.02.2018 / 01:23
2
answers

I would like to know if my query has records in MySQL PHP?

I have this code, but what I'm looking for is how to know if the num_rows is greater than 0, I need that process to be able to send a push notification in WS. $stmt= $conn->prepare("select Token from usuariosempleados;"); $stmt->e...
asked by 10.09.2018 / 21:53
1
answer

Laravel 5.6 query whereNotExist

I have a practice where you should add cars to an insurer and be able to register your insurance, and I'm trying to make a query that, when selecting an insurer from a list, I return all vehicles that are not in that insurer (including those tha...
asked by 28.08.2018 / 17:53
1
answer

Dump MySQL From Client to Server in PHP / Symfony

I have this code with which I create backups of my database $dbname = $this->getParameter('database_name'); $host = $this->getParameter("database_host"); $user = $this->getParameter("database_user"); $pass = $this->...
asked by 31.07.2017 / 19:05
1
answer

Problem with mysqli_multi_query, it does not run when doing multiconsults

The problem is that I do not know how to execute the third multiconsult, I did it this way, the first two queries if they are executed, but the third one no longer. Here the code: <?php if (isset($_POST['place_order'])) { require 'php/lib-g...
asked by 23.08.2017 / 17:19