10,932 Topics
![]() | |
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. | |
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~ :) | |
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, … | |
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 … | |
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 … | |
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. … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. | |
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 … | |
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 … | |
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 … | |
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"; … | |
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 … | |
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 = … | |
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 … | |
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. | |
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 … | |
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 … ![]() | |
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 … | |
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 … | |
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 … | |
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. | |
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 … | |
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 … | |
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 … | |
[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 … | |
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 … |
The End.