Category "mysql"

Loading data from MySQL and populating dropdown select with jQuery Mobile, PHP

I am developing a PhoneGap application that gets some information from MySQL Database. I am struggling when I try to open a HTML page that contains two select i

#1045 - Access denied for user 'root'@'localhost' (using password: YES) MAMP MySQL access denied

I'm trying to copy a live WordPress site to my local server. I went to import the database from the live site through MAMP, and I received an error message when

Update value from table column based on the value from another column

I have the table: countries and columns Country and Status I wish to update only the values from the Status column based on a value from the Country column. SMT

Select option menu read from database and use it's values

<?php mysql_connect("localhost", "root","") or die(mysql_error()); mysql_select_db("tnews2") or die(mysql_error()); $query = "SELECT name,id FROM categories

Dynamic table in HTML using MySQL and php

I've seen many posts about how to build a table in HTML with PHP and Mysql, but my problem is, that I often change the headers of MySQL columns. Is there any wa

Upload a file Using PHP and JavaScript

I selected a image using: <input type="file" id="pimg" name="pimg" accept='image/*'/> My javascript code: p_img =document.getElementById("pimg").val

Managing database connections in Node.js, best practices?

I'm building an Node application which will query simple and more complex (multiple joins) queries. I'm looking for suggestions on how I should manage the mySQL

Inserting Country Selection into MySQL PHP [duplicate]

I'm currently developing a site that provides specific news events to users. The purpose of the site is to allow users to select which countri

Speed up mysql select query [closed]

Am I missing any tricks to speed up this select query? the query is grabbing the location data as the users types it in, its auto filled. $q

Call to a member function fetch_field() on a non-object MySQLiDB

Hi i cant use INSERT UPDATE function with this class: MySQLiDB. Im trying write data to mysql and if exists this data then need update. So i use INSERT ... ON D

Joining results from two tables

I have two tables CREATE TABLE person AS ( id INTEGER, sa VARCHAR2 ) CREATE TABLE sampletest AS ( sa VARCHAR2, cell VARCHAR2, pd

Select rows that have a value matching any one of multiple rows from a second table

Still a mySQL beginner. I have two tables, follows and events, that have these columns: FOLLOWS user | profile EVENTS user | profile | other_stuff I want to

IF EXISTS ELSE?

How would one fix this query? IF EXISTS (SELECT * FROM links WHERE age='10') SELECT * FROM links WHERE age = '10' ORDER BY ELSE SELECT * FROM links ORDER BY

checking different data value in a same column mysql query?

id_detail_item id_item id_detail_item_name 1 1 abc 2 1 abcd 3 1 cde 4 3 z

Importing data from CSV file into MYSQL

I am trying to load data into a database table (MYSQL 8.0.28) in my Windows 11 pc through load data local infile command. I have gone through the syntax (https:

How to test a php login connected to a mysql db through xampp?

hello this is my first post on stackoverflow i am at beginner level at php, mysql and work on a php log in page connected to a mysql database which i did try to

Group returned result by mysql

I have the following table table x labref name repeat_status 111 L 1 111 L 1 111 K 1 111 K 1 111

DELETE FROM `table` WHERE `field`= nothing

How do I delete all rows that have a field called A that are blank. Lets say I have a table that looks like the following. |ID |A |B |C |1 |Data|Data|D

MySQL ALTER TABLE with arguments in stored procedure

In a MySQL migration script, I'm trying to drop all the foreign keys of a table without knowing the name of the constraints themselves. I need this because I ca

How to say or in MySQL statement

I'm trying to match two choices. "One or the other" SELECT * FROM course WHERE category='blue' || category='red' ORDER BY id DESC LIMIT 5 That is my first thou