10,932 Topics

Member Avatar for
Member Avatar for ken.atienza

I use the top table as a cart for 1 customer, and the bottom table for order. I wanted to get the productprice, productname, productqty and put it into orderdetail field. Help and suggestions are very much appreciated. Thanks in advance. *attached a pic of the tables.

Member Avatar for foreshadowed
0
72
Member Avatar for SmallCucumber

hi,thank you for your attention.:P I am thinking of if there are some thing in php like event or trigger to inform another php file, :idea: that I'v just insert something into the mysql database . thank you for giving me some advices~ :)

Member Avatar for SmallCucumber
0
234
Member Avatar for roottybrian

I'm trying to write an SQL (MySQL) Statement here using an if statement but all am getting are countless errors. I've narrowed down to simple instructions but still no breakthrough. [CODE]DELIMITER // CREATE TRIGGER confirmation_triggers AFTER INSERT ON `old_deliquencies` FOR EACH ROW IF new.status='True' THEN INSERT INTO `notifications` VALUES(NULL, new.loan_id, …

Member Avatar for rch1231
0
135
Member Avatar for aiwagner

Hi, I don't usually develop for PHP or MySQL, but I am just doing the odd job for a friend. I am having issues with a MySQL query though. A few days ago I must have done something to the code somewhere, and it is throwing up errors now. I …

Member Avatar for aiwagner
0
159
Member Avatar for aci.herobo

I am trying to set up a form for potential students to give their information for a language academay. When I tested the form with <input type="text" name"Nombre"> type of fields everything went fine. As soon as I tried to introduced drop down menus or typ radio elements the data …

Member Avatar for antonioatt
0
207
Member Avatar for newbie14

Dear All, I have a query as below SELECT DISTINCT (productID),totalAmountAfter,transactionDate FROM tbltransaction WHERE transactionDate BETWEEN '2010-01-01' AND '2010-12-31' ORDER BY productID,transactionDate DESC . My problem now I want is that for each product only pick one line that is the last line since I have ordered by the date. …

Member Avatar for smantscheff
0
104
Member Avatar for girl9907

Hello everybody, This is the first time that I write on. I have working with seven tables, but the wrong when I execute an "insert" is= Cannot add or update show a child row: Error: foreign key: This is a wrong that it was generated, however before that I changed …

Member Avatar for smantscheff
0
47
Member Avatar for gedas

hi guys, i am trying to write a query that would basically display me pas 4 week, however if lets say today is Wednesday the pas for week would have to start from last Friday, none the less if i have to run the query on monday i would want …

Member Avatar for smantscheff
0
74
Member Avatar for anand01

my table design is [CODE] date income expenses 2011-08-5 1000 500 2011-09-6 7000 400 2011-10-7 2000 300 [/CODE] I have daily expenses and Income in the above table.I need to retrieve monthly(sum of daily) income and expenses for particular year. How should i write query for that . Pls help …

Member Avatar for anand01
0
559
Member Avatar for JamesPublic

Hi all, I'm trying to insert an array (which I've decoded from a JSON object) into a mysql database (for the first time!) and keep coming back with a "Could not connect - Column count doesn't match value count at row 1" error message. My server and database connections are …

Member Avatar for JamesPublic
0
298
Member Avatar for roottybrian

I have php code running fine from the server. but if i use any mysql functions e.g. [CODE]mysql_connect()[/CODE], the server does not render the page. it keeps on "waiting for localhost...". what could be the problem.

Member Avatar for roottybrian
0
96
Member Avatar for jakizak

Hi everyone, Having a little difficulty getting anything from this. The code appears to me to be correct, then again I have been looking at it for hours, so it is possible there could be a mistake...... :/ Anyway, the code seems sound, should let me login and instead gets …

Member Avatar for jakizak
0
180
Member Avatar for Cupidvogel

Hi, I am following the chapter on Replication from the book High Performance MySQL. There it is written that I need to enable binary logging and specify a server ID for my MySQL server. It instructs me to write (or verify the presence of) the following lines in the master’s …

0
119
Member Avatar for LRNPHP

Hi There, MySQL is not my strong point so any guidance or advice will be greatly appreciated. I want to know what's the best way of linking multiple MySQL tables together. I have +-10 tables that will interact with each other. Example Tables : users, logins, communication, sightings etc. When …

Member Avatar for LRNPHP
0
172
Member Avatar for santhanalakshmi

The below coding is the javascript coding in which i have used [B]AJAX coding also[/B].its only pagenavigation coding. [CODE]function change(which) { if(which=="page1") { document.getElementById(which).style.borderBottomColor="white"; document.getElementById("page2").style.borderBottomColor="#778"; document.getElementById("page3").style.borderBottomColor="#778"; document.getElementById("page4").style.borderBottomColor="#778"; } else if(which=="page2") { document.getElementById(which).style.borderBottomColor="white"; document.getElementById("page3").style.borderBottomColor="#778"; document.getElementById("page4").style.borderBottomColor="#778"; document.getElementById("page1").style.borderBottomColor="#778"; } else if(which=="page3") { document.getElementById(which).style.borderBottomColor="white"; document.getElementById("page4").style.borderBottomColor="#778"; document.getElementById("page1").style.borderBottomColor="#778"; document.getElementById("page2").style.borderBottomColor="#778"; } else if(which=="page4") { document.getElementById(which).style.borderBottomColor="white"; document.getElementById("page1").style.borderBottomColor="#778"; document.getElementById("page2").style.borderBottomColor="#778"; …

Member Avatar for mytool.parekh
-1
5K
Member Avatar for newbie14

Dear All, I have a table tblEventAlert as below. So what happens when the data gets insert into this table the problem is that the eventAlertID is autoincrement. Then below it I have another table. My problem is that I want the eventAlertID to be stored into the tblSCvData. I …

Member Avatar for urtrivedi
0
140
Member Avatar for aldeene

what's wrong with my code? i'm new to java, can someone help me? the data is not showing. [CODE] public class GUI { private static JTextField fname = null; private static JTextField lname = null; private static JTextField search = null; private JPanel panel = null; private JPanel tablePanel = …

Member Avatar for mKorbel
0
163
Member Avatar for prem2

Dear team, Please explain, which one will be faster in Mysql for the following query? SELECT * FROM `userstatus` where BINARY Name = 'Raja' [OR] SELECT * FROM `userstatus` where Name = 'raja' Db entry for Name field is 'Raja' there is no key for the field. I have 1000000 …

Member Avatar for iw2011
0
170
Member Avatar for sandadps

I want a ready made database of the countries all over the world, the major cities of those countries and their time difference (in hours) from GMT. Please tell me where to get it. I need it soon.

Member Avatar for iw2011
0
128
Member Avatar for reco21

What im doing is i have a form with 4 inputs like below. and im using the post method to store the fields values so i can send them to the database. what i neeed is each input to be put into a separate row in a databases table. also …

Member Avatar for reco21
0
142
Member Avatar for davy_yg

banner_manager.php [CODE] //Cek apakah ada file yang diupload if((!empty($_FILES["uploaded_file"])) && ($_FILES["uploaded_file"]['error'] == 0)){ $gambar = uploadPicture("uploaded_file"); } if (empty($id)) $sqlstr = "INSERT INTO banner(link, gambar) VALUES('".$link."','".$gambar."')"; else $sqlstr = "UPDATE banner SET link = '".$link."',gambar = '".$gambar."' WHERE id =".$id; $result = mysql_query($sqlstr) or die(mysql_error()); $confirmation = ($result)? "Data telah …

Member Avatar for Zagga
0
214
Member Avatar for voidyman

Hi, Is there a way i can pass variable column names to a stored proc? Here's what i want to do: i have lots of tables and for each of those i want to select out a few columns. e.g from table titles i want to pick out title_name and …

Member Avatar for debasisdas
0
610
Member Avatar for joslup9

php and mysql form Hi all, how I can add values ​​in a table to a combo box in html .. eg: the user's table has the id 1,2,3,4 and that using a query, being able to move to a combo box, to make a selection of id?. Greetings and …

Member Avatar for joslup9
0
298
Member Avatar for Morta

hii..I have proplem of converting datatype from decimal to float to show it in view from table: [CODE] create table st_fees(s_no int(4) primary key,s_name varchar(50), reg_fs decimal(5,2),study_fs decimal(8,2),curr int(1)); [/CODE] and my view creation code is [CODE] create view sum_fs as select s_no ,s_name,reg_fs+study_fs as fees,curr from st_fees; [/CODE] the …

Member Avatar for smantscheff
0
96
Member Avatar for newbie14

Dear All, I would like to generate pdf document via my php page which are based on mysql data? Any recommendation so far I have seen fpdf and tcpdf. Which one will be better or is there any better tool for it? Thank you.

Member Avatar for chrishea
0
85
Member Avatar for cdoggg94

This is what I have for a main page and form and upload code for an image. The image information is stored in a Blob field in phpMyAdmin. [CODE] <?php error_reporting(0); mysql_connect("sql5c1d.megasqlservers.com","vincastweb356440","fakepassword") or die(mysql_error()); mysql_select_db("phpmy1_vincastweb_com") or die(mysql_error()); $picture = $_FILES['image']['tmp_name']; $brand = $_POST['brand']; $year = $_POST['year']; $story = $_POST['story']; $description …

Member Avatar for cdoggg94
0
244
Member Avatar for TheSassyDragon

Im trying to write a delete function for a "path" class which has data points (lat/long). It also has notes and photos along it but each of these objects have comments that also need to be deleted. Essentially everything associated with the path. Here's my SQL attempt in the most …

Member Avatar for urtrivedi
0
121
Member Avatar for aldm

Hi, how can I import database file (.sql) to my database in phpmyadmin and ignore or replace duplicate fields. For example, if I have news with id 5 in .sql file and my local database, I want to replace that record in local database with record in file. I tried …

Member Avatar for smantscheff
0
174
Member Avatar for ken.atienza

[CODE]$sql="SELECT * FROM accounts,adminaccount WHERE accounts.emailaddress='$username' and accounts.password='$password' or adminaccount.emailaddress='$username' and adminaccount.password='$password'"; $result = mysql_query($sql); $count=mysql_num_rows($result); $row = mysql_fetch_assoc($result); $usertype = $row['usertype']; if($count==1) { $_SESSION['usertype']= $row['usertype']; $_SESSION['id'] = $row['id']; if($usertype == "admin") { header("location:indexadmin.php"); } else { header("location:indexmember.php"); } } else { header("location:index.php?page=loginfail.php"); } ?> [/CODE] I wanted it to …

Member Avatar for Matthew N.
0
152
Member Avatar for duffy12

Hi am really new with php mysql, i need help pls. I have created a email software in my server, there is a field for inserting email data info. Right now i am inserting these data one by one, but this is annoying and taking hard time. Pls help me …

Member Avatar for duffy12
0
135

The End.