10,940 Topics
| |
Dear Sirs, I have two tables (Clients and Country), my below php code is for creating a new client with a dropdown box from country to insert the id_country into clients table. When click add new nothing added to table clinets: any help please: <?php $jsFile = 'newClient'; // Add … | |
Hi!, Need a little help... thanks in advance!!!! Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/exponentialprofi/public_html/affiliates/topreferrals.php on line 22 (code in question) <?php $dsplynumreftop="5"; $qryreftop = "SELECT usrnam, (usrpoints + usrpointsindirect) AS maxpoints FROM scraffiliateusr ORDER BY maxpoints desc"; $rslreftop=mysql_query($qryreftop); //$arrreftop = mysql_fetch_row($rslreftop); $nreftop = … | |
if ($count == 1){ $suc= move_uploaded_file($file_tmp, $destin.$file_name); echo"<br/>"; $query = mysqli_query($con,"INSERT INTO login ( profile_img) VALUES ('$file_name') WHERE useremail='".$_SESSION["sess_useremail"]."'") or die("can t still upload ".mysql_error());} | |
| I have the followiing data in my database(mysql) [img]http://i.imgur.com/jy3ryVk.png[/img] i want to represent then in a simple bar chart row after row with 2 sec interval(looks like dynamic).I am using jsp for my website.Code appreciated. |
<?PHP include('config.php'); function cleanData(&$str) { $str = preg_replace("/\t/", "\\t", $str); $str = preg_replace("/\r?\n/", "\\n", $str); if(strstr($str, '"')) $str = '"' . str_replace('"', '""', $str) . '"'; } // filename for download $filename = "Piante_" . date('Ymd') . ".xls"; header("Content-Disposition: attachment; filename=\"$filename\""); header("Content-Type: application/vnd.ms-excel"); $flag = false; $result = mysql_query("SELECT * … | |
below, I have created 4 tables using oracle sql. I want to change the code so that when deleting a student will delete all enrollments for that student. any idea how can I do this? # COURSES table # CREATE TABLE COURSES (COURSE VARCHAR(6), DESCRIPTION VARCHAR(60), CREDITS INT, CONSTRAINT pk … | |
I posted earlier today about converting my MySQL to MySQLi - Upon further research I came across the following, Prepared Statements. It seems that this may be a good way to go but I am a bit confused about how to implement it. I am simply taking User-entered data from … | |
Hi, I want to create a SP in mySQL to insert records and return the Primary Key. But when I try and create the SP I get error: mysql said #1064, You have an error in your SQL Syntax, Check the manual that corresponds to your MySSQL server version for … | |
I'm using pure php for the moment and I'm having a problem on what to do next using the command `DESCRIBE` calls all the header of my database but I cannot call those datas under the headers I have to manually put it. What I want to know is: * … | |
hello everyone, i had to make a new system for practicum student system this is coding for view student that has been registered. first of all sorry fpr the keywprd that you dont understand cause i am Malaysian `<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta … | |
i want to create a image gallery,i want to insert multiple files at a time,that should be stored in a database,and i want to display that in my profile.php as a gallery. | |
Hello. I am beginning the process of coverting all of my MySQL to MySQLi. I have been doing much research on this but find it a bit confusing. I have two questions at this point regarding the matter: 1) What does it exactly mean to "escape" a string and where … | |
I was designed a database model for my social network project. It has follower system. If you follow him the follower can see the status. All these operations are for one page. (This page is name **user_wall.php**) Its has a GET value and this is **userName**. For this case about … | |
Hi, I have a problem with exercise 51 from sql-ex.ru, please help. Thanks in advance. # Short database description "Ships" # The database of naval ships that took part in World War II is under consideration. The database has the following relations: Classes(class, type, country, numGuns, bore, displacement) Ships(name, class, … | |
Hey Im making an online store and cant figure out the section on inserting data into a table (in this case its inserting customer details into a customer table). Its the VALUES line that is displaying the error: mysql_query() expects parameter 1 to be string, resource given. I have looked … | |
Hi guys! I have a database which holds a table called users. in there i have a balance column which contains a numeric value. I have the following code and for some reason it doesnt work: <?php session_start(); include_once("config.php"); ?> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Search</title> … | |
| This is the table that gives error -- ----------------------------------------------------- -- Table `mydb`.`Supervise1` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `mydb`.`Supervise1` ( `S1_Date` VARCHAR(45) NOT NULL, `S1_Contracter` VARCHAR(45) NOT NULL, `S1_Contractee` VARCHAR(45) NOT NULL, `S1_ID` VARCHAR(45) NOT NULL, PRIMARY KEY (`S1_Contracter`, `S1_Contractee`, `S1_Date`, `S1_ID`), INDEX `Contracter_idx` (`S1_Contracter` ASC), INDEX `Contractee_idx` (`S1_Contractee` … |
I am trying to save 2 photos to my MySQL database. I can only see one of the 2 photos in the database (i.e. its name) but I see the 2 photos in the folder I store my photos. ( A picture of how the database looks like is attached.) … | |
I am trying to compare IF statements. if ($_POST['price'] =="see all"){ //show okolo } else if ($_POST["accommodation"] =="see all"){ //show chibuzo } This works but as soon as I add: else if ($_POST['price'] =="see all" AND $_POST['accommodation"]=="see all"){ //show henry } This stuff does not work, it now shows "okolo" … | |
I am sorta new to MySQL and not 100% sure of what I can and can not do with it yet. I have an xml file with course information such as ReferenceNo. CourseName, CourseType, CourseLocation, and I want to load in into a database table that has column names such … | |
Can somebody explain me why does this mysql query SELECT * FROM mytable WHERE F='d2f2' AND Tot>Pmin AND Tot<Pmax omit this row ID ¦IDa¦F ¦Pmax¦Pmin¦Tot --------------------------- 124¦160¦d2f2¦200 ¦12 ¦182 thanks! | |
| i have continued my developing my code on e-commerce website to grant the discount to client on basis of coupon code entered <?php /** * Consider and apply voucher codes * Types of voucher code * - = FIXED AMOUNT OFF * % = PERCENTAGE OFF * s = SET … |
when i run select on temporary table in mysql it gives all records. But when i tried in my php page it give blank reason. Please help me out. | |
Hi, I am working on a test site locally. I am loading an xml file into my database with teh following sql query: LOAD XML LOCAL INFILE 'C:/courseInfo18.xml' INTO TABLE wp_courses ROWS IDENTIFIED BY '<Course>' (ReferenceNo, ProviderCode, ProviderName, CourseID, CourseName, CourseTypeID, CourseTypeName, LocationCode, LocationName, StartDate, FinishDate) ; It works fine … | |
Hello, I have a script that allows user to upload a file to a mysql 5 database. That is working OK. The File size is accurate. However, my download script is for some reason downloading the files without any content - 0KB. The files are OK when I open them … | |
Hi, My query: $query = "select * from ( select * from students union all select * from students ) as tmp order by rand() limit 5"; $myquery = mysqli_query($db_connect, $query); while($students = mysqli_fetch_assoc($myquery)){ $stdid =$students['stdid']; $name = $students['name']; $dept = $students['dept']; echo "<br><br>".$stdid."<br>".$name."<br>".$dept; } There are 20 rows for … | |
I have news pages generated dynamically using page news.php taking data that is input into a MySql table and would like to have the page title to be the same as the news headline of each page. I'm searching internet and although there is lots of info on this subject … | |
Hi Everyone, I am looking for the best way to create a PHP MYSQL Query to help me output a complete list of categories from my db. The categories are football team names & I would like to display everyone who supports each football team. For Instance: I have 44 … | |
I'm trying to parse a few references from a file and load them to mysql table but keep on getting this error everytim,e i run the script: DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the … |
The End.