10,945 Topics

Member Avatar for
Member Avatar for rouse

This is a novice question and I hope some one can help. So far I have written 2 forms and a 3rd file. The first pulls every record from a table where the user can choose to modify a particular record. On the second form the user modifies the record …

Member Avatar for rouse
0
265
Member Avatar for rouse

I’m trying to patch a routine and I finally found the problem. I am given the following string: [code] $query = "SELECT title, DATE_FORMAT(event_date, '%Y-%c-%e') AS event_date FROM $dbTable WHERE event_date LIKE '$year-$month%'"; [/code] In the month variable at the end, for the months January through September I am returned …

Member Avatar for rouse
0
321
Member Avatar for rouse

I am looking for help to write a query. I have a database with an ID a Date_Field and a Description. I want to find out two things What Date_Field and Description and Description are the same? {duplicate records} [code] SELECT * FROM TIME_TABLE t1 WHERE EXISTS ( SELECT * …

Member Avatar for rouse
0
177
Member Avatar for rouse

I the found the link below when I was researching how to get a random record for a database. This article is about speed in retrieving a random record and I found in my test that speediest solution brought about the most duplicates. [url]http://akinas.com/pages/en/blog/mysql_random_row/[/url] I am hoping some one has …

Member Avatar for rouse
0
100
Member Avatar for UK-1991

I have created a vendors page where I want to show how many vendors exist in the database. I have succcssfully done but main problem is that how do i show that which vendor contains how many products There are 2 tables I have created 1 is products 2nd is …

Member Avatar for UK-1991
0
221
Member Avatar for James_43

Hi all, I am trying to populate text on my website from data stored in a MySQL database. I have this script before the <head> of my HTML to establish the connection: <?php $username = "USERNAME"; $password = "PASSWORD"; $hostname = "127.0.0.1:3306"; //connection to the database $dbhandle = mysql_connect($hostname, $username, …

Member Avatar for jj.dcruz
0
302
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
325
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
265
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
178
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
65
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
702
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
226
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
321
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
237
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
311
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
444
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
286
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
410
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
560
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
996
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
266
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
289
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
205
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
123
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
202
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
344
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
95

The End.