Home » Databases » Page 3
create a website product comparision query using php mysql
Databases
Hi
I am trying to create a simple web comparision page using php-mysql.
The web pages contains products. I would like to provide viewers with the option to compare products. Atmost 4 products should be compared at same time.
Therefore i propose to place a small checkbox next to each product to see if 4 products are selected. Once 4 products are checked and compare button is clicked

Help with query creating
Databases
INSERT INTO soldItems(itemId,qty,price,buyer,date,buyerStatus,sellerStatus,address,shipType,paymentType) VALUES('$i',XXX,XXX,'$user','$time','0','0','$shipType','$paymentType');
But qty,price must get so:
SELECT cart.qty, cart.qty*items.price as price FROM cart,items WHERE cart.user='$user' AND cart.itemId='$i' AND items.id='$i';
But with conditions
SELECT IF( EXISTS( SELECT *

Help with UPDATE datetime
Databases
I want to execute an UPDATE query to update a datetime field but I am not getting the desired results!
Here is the query:
Syntax: [ Download ] [ Hide ]Syntax: [ Download ] [ Show ]$result = mysqli_query($con, "UPDATE `tasks` SET `deadline`=".$_POST['dt'].", `status_id`=3 WHERE `task_id`=".$_POST['id']."");
The deadline is the dat

display information from a database column
Databases
Hello I made a request to display information from a base against I do not get it to appear in column
For information in the database I have dates with several slots
before(data from the base=
22/10/2013 HD:10h30 HF:11h30
22/10/2013 HD:18h30 HF:20h30
22/10/2013 HD:21h30 HF:22h00
23/10/2013 HD:10h30 HF:11h30
23/10/2013 HD:18h30 HF:20h30
25/10/2013 HD:10h30 HF

establish relationship in mysql or let php take care of it?
Databases
Hello all,
I am somewhat new in writing codes in php and been wondering about something:
Every book I read and tutorial I follow, I never see any examples where relationships between tables are established in mysql. everything seems to happen while coding in php and joining when or where it is necessary. AM I better off not establishing relationships in mysql and deal with relationship

Get two percentages in a single query
Databases
Ok I have a single table called opportunities, within that table I have field called sales_stage. I need to get the percentage of rows where sales_stage is "Closed Won" and also get percentage of rows where sales_stage is "Closed Lost" And basically just display the two headings Closed won and Closed Lost.
I'm a little bit lost with how to do this one, here is an sql fiddle
http://sqlfid

Is there a max number of rows a query can export as CSV?
Databases
Syntax: [ Download ] [ Hide ]SXBB[id].writeCmd();Syntax: [ Download ] [ Show ]$result = mysql_query ("SELECT DISTINCT subscribed_upload.email FROM subscribed_upload LEFT JOIN unsubscribed ON subscribed_upload.email = unsubscribed.email WHERE unsubscribed.email IS NULL") or die (mysql_error());
while($row = mysql_fetch_array($result))
&nb

Unable to Perform CRUD Operations in MongoDB Using PHP
Databases
0 down vote favorite

I am a rookie PHP and MongoDB developer.
I have created a PHP web project with an HTML page that contains an 'Add' button. The name of the page is awards.html. The awards.html file contains its counterpart JavaScript file, awards.js. A code is executed in this js file when the Add button is clicked. This code sends an AJAX call to a PHP class elsewhere in the

How to test MySQL on Linux Mint 14
Databases
Hi everybody,
I've installed XAMPP on Linux Mint 14 successfully. PHP works perfectly, but I need to test MySQL. How can I do that? I've found a lot of tutorials to test MySQL, but to do that first I need to access the MySQL shell using the following command:
Syntax: [ Download ] [ Hide ]Syntax: [ Download ] [ Show ]mysql -u root -p
Problem is that, when I'm issuing that command fro

values does not go in to the table
Databases
Hello ;
Please refer to the attached script. The information that I entered through a PHP form does not go int the mysql table. I have tried so many things but it does not work. It always gives me the "ERROR" message.

Syntax: [ Download ] [ Hide ]SXBB[id].writeCmd();Syntax: [ Download ] [ Show ]<?php
$connect = mysql_connect ("localhost","root",&qu

Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .