So I have some results where the query is like SELECT * FROM employees ORDER BY birth_date ASC; This simply puts the birth date in ascending order. I want to only display the elder most employees. How can I edit this query to display that Note : More
I am trying to create a booking system in php and mysql with a datepicker. When user selects a date a table with available period times should be displayed. If a time frame is available, the user should use the radio input and book that period of tim
I've got following, simple table Item (id, name, date, fixed_position) (1, 'first entry', '2016-03-09 09:00:00', NULL) (2, 'second entry', '2016-03-09 04:00:00', 1) (3, 'third entry', '2016-03-09 05:00:00', NULL) (4, 'fourth entry', '2016-03-09 19:00
Hello everyone. I have something weird with MySQL. (Oh, first of all, sorry for my poor English.) I've made the simple table and stored procedure. Table definition is... CREATE TABLE numTable ( firstNum INT, secondNum INT ); INSERT INTO numTable (fir
I am trying to count the entries for the current day and sum the total. Currently, I have a query that counts the entries per day. I am using the datetime field to achieve my end goal. What would be the best approach to count the entries for the curr
This question already has an answer here: How to upload files to server using JSP/Servlet? 12 answers I want to upload multiple images into server folder using jsp and servlet I can upload single image but i am unable to upload multiple images Please
below is the authorisation script (from login). I want to send a user to a specific page depending on (new column called company to be added to database table) a user and their company. Current script, even if someone can point me in the direction I
I have this below weird problem with my mysql query. Correct me if i am wrong. This below query( Which i have printed from Codeigniter ) giving me result with subject = 4. WHERE `notes`.`subject` IN ('4,2') GROUP BY `notes`.`id` ORDER BY `created_dat
I have a php script I wrote and it will not return anything except "Hello". <?php echo "Hello"; $username = "me"; $password = "password"; $hostname = "localhost"; $dbname = "dbname"; //connect
So, I'm aware this isn't exactly a programming question but I felt it was still appropriate. What is the difference between Oracles proprietary RDBMS, that they license, vs MySQL, an open source DBMS they bought? Performance? Support? Security? Featu
This is the SQL statement: SELECT opc.contenido, COUNT(r.idOpcPregunta) from Opcionesrespuestas as opc LEFT JOIN Respuestasimples as r ON r.idOpcPregunta = opc.idOpcPregunta where opc.idPregunta ='6' GROUP BY opc.idOpcPregunta; This is a HQL select o
I have database mysql with table 'tblevel' with column 'waktu' with varchar data type. and the column hold values like this: 30-01-2014 12:19:09 The value will be converted to timestamp, because I have to do that for data viewing in graphic, in this
Friends, in my project I have a variable named bill_number; every time the PRINT bill button is clicked I want to increase the value of bill_number by one in the database. Please help me as soon as possible. set @bill_number = @bill_numer+1; This is
I currently have a table on my site but I need there to be a icon or something next to the text on the categories in the table to make the values ascend alphabetically, I have no idea how to do this and I have looked. Here is my code- (Yes I know its
Table structure: MyTable ( ID INT AUTO_INCREMENT, Num1 INT, Num2 INT, Num3 INT, Num4 INT, PRIMARY KEY(ID) )engine=InnoDB; Now i have around 20-30k records. Num1, Num2, Num3 and Num4 are just some random numbers. Im trying to select 2 and 3 number com
Here's an example for what I am looking to do : I have 3 tables : Villages (id, name) Households (id, village_id) Persons (first_name, last_name, household_id) I would like to make sure there isn't 2 persons who have the same first name and last name
I have a Table in my MySQL Database which looks like this: Table: VAAW Columns: ID int(11) PK AI Voornaam varchar(45) Achternaam varchar(45) Adres varchar(45) Woonplaats varchar(45) I am using this table in the following php code: $strSQL = "SELECT *
I have two database. <add name="OdonovanTestConnectionString" connectionString="Data Source=ODO-SRV004\;Initial Catalog=OdonovanTest;Integrated Security=True" providerName="System.Data.SqlClient" /> <add name="r
I'm building a small internal phone number extension list. In the database I have two tables, a people table, and a numbers table. The relationship is a one-to-many respectively. I want to display the results in a single HTML table with one person pe
This is my database: Here I have to check the query current date+status=Q information and get the count value. This is my code: public class TodayQ { public int data() { int count=0; Date date = new Date(timestamp); DateFormat dateFormat = new Simple
I'm new to PHP and I'm curious as to how you generate pages on the fly? I have a table of users that I'm pulling from my DB and displaying on my homepage and that I know I can pass their user ID as a POST variable to 'mysite.com/profilepage.php' and
I'm currently working on a stock quote site, I have this condition in my pages when using quote symbols to search for information on quotes. If the symbol isn't found in the database, I need to redirect the user to a "find a symbol" page. Here i
I have table with days, version and active. In table I have the same days where active = 1 and active = 0 I need to get from the database all these days, where active = 1 and where version_id is max. For this purpose I wrote the following query: SELE
I working on movies & cinemas showtimes guide. and I have showtime table (photo #1) and I have times table (photo #2) and I need to show list of cinemas with showtimes in movie page like this Cinema name: Time1 - time2 - time3 Grand Cinema:** 00:18 -
I'm trying to add the contents of all the rows retrieved from a query. So far I have tried: $totalquery = "SELECT SUM(catalogue.price) AS fCount FROM catalogue LEFT JOIN orders ON catalogue.plantid = orders.orderplantid WHERE orders.orderplantid = '$
I'm currently working with a database table that is structured as follows: ______________________________ | id | content | next_id | |------|-----------|-----------| | 1 | (value) | 4 | | 2 | (value) | 1 | | 3 | (value) | (NULL) | | 4 | (value) | 3 |
MySQL docs about NOW() function... Returns the current date and time as a value in 'YYYY-MM-DD HH:MM:SS' or YYYYMMDDHHMMSS.uuuuuu format, depending on whether the function is used in a string or numeric context. The value is expressed in the current
I have an array with the result of a query: .....some code..... $result = mysql_query("SELECT * FROM vttest"); $row = mysql_fetch_assoc($result); print_r($row); But it only prints one record, I can't put $row in a loop because I will be working
Update: After playing around with this for a few hours, went with a multi-query solution and used a table that only contained parent attributes to determine which items needed updating. Sorry for the poor title, I couldn't think how to concisely desc
I had a hard time summing up my question. Basically: There's a table called "files". Files holds an entry called "grades". It is used to identify the particular grade level a file might be useful for. Because a file can be useful for &