If there is a table, test, how can we return "No data" if the table has only title but no other rows? IF (SELECT 1 FROM test) < 1 THEN (SELECT ' No data');
I'm getting information from database, saving it in array and echoing it in a form with loop structure and I'm having problems when I try to save the modified i
I'm trying to build a mysql pod on Google Cloud. However, when I create a database and then restart the pod, the database that I created is not persisted. I fol
I have 2 select items. In the first one I'm loading the options from a MySQL database table using PHP. The second one I want to load the fields from another t
I've been trying to connect Dreamweaver to a MySQL Database for a while. These are the login data: $mysql_host = "mysql16.000webhost.com"; $mysql_database = "
I am working on a scraper to pull street names and zip codes from a site and all of that is working great and it builds a CSV file just fine for me. But when I
I have a simple application in which users submit data into a table. There are currently 3 fields the user can pass values to at the moment.
This is what I tried but it fails: alter table goods add column `id` int(10) unsigned primary AUTO_INCREMENT; Does anyone have a tip?
I deployed my project to an AWS EC2 instance using Elastic Beanstalk. I used this tutorial https://www.youtube.com/watch?v=ISVaMijczKc as a reference while depl
Whenever I try to input data into my tblorder I get the error message #1054 - Unknown column 'FK_Customer_ID' in 'field list'. I have tried breaking my code do
I am writing a module for drupal6/PHP5 using MySQL (and optionally PostgreSQL). To represent arbitrary sample properties and instrument readings in an experimen
I'm setting up testing in golang. I use go-sqlmock to test mysql connection. But sqlmock.NewRows and mock.ExpectQuery does not work well with error. I want to k
I need to generate unique slugs based on titles of articles. For matching slugs I want to append a number to the end to make them unique. I made this function b
I created a Many to Many relationship on SQLAlchemy, but for some reason when I access it it's not emitting a JOIN clause, but rather selecting from a cross pro
I like to join a temporary table in MySQL which fails, the idea quite simple: CREATE TEMPORARY TABLE temp_table LIKE any_other_table; -- srsly it does not matt
Table 1(reports) - Structure with Data id distributorId clientId amount 1 1 162 2500 2 2 163 3500 3 3
I would create a setup program for my Java application. It uses a MySQL database. So the installation of my program must include the installation of MySQL serve
I've created a table with some NOT NULL columns using phpMyAdmin. CREATE TABLE `TEST` (`ID` INT PRIMARY KEY AUTO_INCREMENT, `Firstname` V
If I do: SELECT * FROM A WHERE conditions UNION SELECT * FROM B WHERE conditions I get the union of the resultset of query of A and resultset of
I have some difficulties with mySQL commands that I want to do. SELECT a.timestamp, name, count(b.name) FROM time a, id b WHERE a.user = b.user AND a.id =