Questions tagged as 'mysql'

1
answer

Error in mysql query with php

$re=mysql_query( "select * from productos where id=".$_GET['id'] ) or die (mysql_error()); This upper line gives me this error, but I can not find it:    You have an error in your SQL syntax;...
asked by 23.03.2017 / 13:31
2
answers

(!) Notice: Use of undefined constant name - assumed 'name'

I am trying to query my database with php but it throws me an error. This e my code [![<?php $servername = "localhost"; $username = "venividivici2016"; $password = "4XDjhDFsxBtbxRsw"; // Create connection $conn = mysqli_connect($serve...
asked by 26.06.2016 / 09:39
0
answers

Compatibility between MySQLDriverCS and libmysql.dll

Some time ago I have random problems with the connection between my generated application with
asked by 13.01.2016 / 18:34
2
answers

Problem with trigger when updating the same table

I can not get through the MySQL Database to control that everything is inserted in upper case, or update after inserting. I have the following trigger in the table paises ( idPasi , pais ): CREATE DEFINER = CURRENT_USER T...
asked by 11.09.2018 / 21:16
2
answers

Error inserting data in mysql

<form name="datos" action="TP 371 Orangel.php" method="post"> Nombre:&nbsp; &nbsp; <input type="text" size="15" pattern="[A-Za-z]{3,}" name='nombre' id='nombre' required><br><br> CI/RIF:&nbsp; &...
asked by 08.11.2018 / 13:14
2
answers

I can not connect to the database

I have this code: <?php class Conexion { private $host = "localhost"; private $user = "root"; private $pass = ""; private $bd = "nutricion"; private $con; public function Conectar() { $this->con = mysqli_...
asked by 20.04.2018 / 19:32
1
answer

Update MYSQL does not work correctly

I have this code: <?php session_start(); if (!isset($_SESSION['user'])){ header("Location: index.php");} include("db_files/db.php"); include("inc/functions.php"); $oldpass = mysqli_real_escape_string($db, $_POST['oldpass']); $ol...
asked by 04.11.2016 / 16:35
1
answer

Get Date from the Database

I need to get the date (in particular the year) from the database to integrate it into Java String now = "SELECT DATE_FORMAT(NOW( ), '%Y' )"; try { java.sql.Statement sp=cn.createStatement(); ResultSet RS = sp.exe...
asked by 20.11.2018 / 18:03
2
answers

How to extract data from more than two data from a database column to take them to php?

I have the following table in which I want to extract the data from id_sample that are related to id_ott, for which I occupy the following query SELECT sample_id FROM lacem_obras_civiles.msa_register_show whereott_id = 111; Throw...
asked by 09.11.2018 / 18:02
4
answers

How to differentiate 2 id within the same query

I have the following quey: $query = "SELECT pedidos.*, users.id, users.nombre, users.email, users.username FROM pedidos INNER JOIN users ON pedidos.usuario=users.idusuario WHERE (email LIKE '%$busqueda%' OR nombre LIKE '%$busqueda%' OR monto...
asked by 15.11.2018 / 16:50