Something wrong with mysqli_fetch_array in php?

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

MySQL results set sorted by fixed positions

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

how to upload multiple images to a folder using jsp and servlet

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

php do not connect to mysql or reply

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

Oracle vs MySQL in context

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

How to convert this statement from MySQL to HQL?

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

How to convert the data type varchar to timestamp mysql?

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

How to increase the number of MySQL variables

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

how to make values ​​on the ascending or descending table

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

Select 2-3 combination of numbers from 5 columns MySQL Table

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

Get column names from the MySQL table

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 *

database does not connect in iis

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

convert time stamp to date in Java

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

Generate pages on the fly with PHP

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 '' and

PHP page redirection in the condition statement

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

PHP Yii Relationships: Movies & amp; cinemas & amp; schedule

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 -

Sum of all lines of the WHERE condition?

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 = '$

MySQL NOW () returns only the year

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

mysql_fetch_assoc only gets one record

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