10,940 Topics

Member Avatar for
Member Avatar for ribrahim

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 …

Member Avatar for ribrahim
0
322
Member Avatar for duchaine

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 = …

Member Avatar for rubberman
0
263
Member Avatar for phoenix254

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());}

Member Avatar for pritaeas
0
176
Member Avatar for amogh.max

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.

Member Avatar for AleMonteiro
0
63
Member Avatar for bolfescu

<?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 * …

Member Avatar for bolfescu
0
681
Member Avatar for hwoarang69

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 …

Member Avatar for diafol
0
225
Member Avatar for berserk

I am in need of help on this one :( i cannot seem to figure out what i have done wrong, i set up my code just like in teh examples i read and i dont really see anything wrong with the logic (as far as i can tell) but …

Member Avatar for berserk
0
316
Member Avatar for mattyd

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 …

Member Avatar for pritaeas
0
234
Member Avatar for DGULLIVER

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 …

Member Avatar for pritaeas
0
6K
Member Avatar for jj.dcruz

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: * …

Member Avatar for jj.dcruz
0
300
Member Avatar for Fieyzah

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 …

Member Avatar for pritaeas
0
442
Member Avatar for shashigowda

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.

Member Avatar for jj.dcruz
0
273
Member Avatar for mattyd

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 …

Member Avatar for deceptikon
0
408
Member Avatar for fthmad

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 …

Member Avatar for fthmad
0
558
Member Avatar for ruhestorer

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, …

Member Avatar for SOURABH_2
0
1K
Member Avatar for MarkDbro

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 …

Member Avatar for Szabi Zsoldos
0
988
Member Avatar for spud91

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> …

Member Avatar for jj.dcruz
0
262
Member Avatar for Kubilay Doğukan

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` …

Member Avatar for Kubilay Doğukan
0
285
Member Avatar for uchejava

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.) …

Member Avatar for amith_ami
0
203
Member Avatar for uchejava

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" …

Member Avatar for uchejava
0
119
Member Avatar for donz365

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 …

Member Avatar for diafol
0
2K
Member Avatar for naui95

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!

Member Avatar for Reverend Jim
0
201
Member Avatar for anmol.raghuvanshi1

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 …

Member Avatar for matrixdevuk
0
343
Member Avatar for rchawdhari

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.

Member Avatar for rchawdhari
0
94
Member Avatar for donz365

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 …

Member Avatar for DaveAmour
0
924
Member Avatar for TMLAH

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 …

Member Avatar for abhisheklnt
0
6K
Member Avatar for boney

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 …

Member Avatar for JorgeM
0
154
Member Avatar for AllanSS

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 …

Member Avatar for diafol
0
2K
Member Avatar for lloyd.farrell.7

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 …

Member Avatar for pritaeas
0
289
Member Avatar for Amaina

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 …

Member Avatar for DaveAmour
0
160

The End.