10,946 Topics
![]() | |
Hi everyone I know there already is a thread on that one, but not enough for me to make it work. So I know I can do : $command = "mysqldump -u [username] -p [password] [databasename] > [backupfile.sql]"; then system($command); the thing is, I'm on a web server (hosting company) … | |
I have the following code:[CODE] if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $insertSQL = sprintf("INSERT INTO inventory_software_request (Software, Name, NISD, Room) VALUES (%s, %s, %s, %s)", GetSQLValueString $_POST['software[]'], "text"), GetSQLValueString($_POST['name'], "text"), GetSQLValueString($_POST['nisd'], "text"), GetSQLValueString($_POST['room'], "text")); [/CODE] to send data to a MySQL database. the form includes a list of software … | |
Hi, How do I go about creating a XML document from information requested from multiple tables ? Do I need to split the queries up or can I just run it as one complete query ? Then how do I set it up so that information is output into an … | |
I'm a novice when it comes to MySQL so I'm not too sure about how to go about this. I have two tables, and both tables have two fields I need to deal with. Table investors has fields Dealer and Rep. Table advisors has fields dealer and rep. investors.Dealer = … | |
hye guys.. i've got a problem on inserting the data from mysql database into the textbox in php.. i dont get any error reply..but im still cant retrieve the data from the mysql database into text box in php.. below are the print screen and my sourcecode: this is the … | |
I need to make a Registration show hide based on whether you are > 48 hours or =< 48 hours out... I wrote this before based on a start and end time... [CODE]<?php $startdate = $row_product['startdate']; $enddate = $row_product['enddate']; $todays_date = date("Y-m-d"); if ($enddate <= $todays_date) { header('Location: expired.php'); } … | |
how to nsert and retrieve image into mysql database? | |
hi everyone i am having a problem in my mysql class to retrieve the stored data in database. i want to retrieve data in view class calling controller class and then model class for select query. plz help me the code is bellow. call from view to controller in line … | |
Hi, I want to make the table for (hold on book),So my fields are book_name Dt_placed_on no_of_books Dt_expires_on So is there any more fields i need to add?Please mail me. | |
Error Database connect failed Warning: mysql_error() expects parameter 1 to be resource, null given in /home/globilla/public_html/inc/classes/BxDolDb.php on line 447 Fatal error: Call to a member function getParam() on a non-object in /home/xyz/public_html/include/db.inc.php on line 83 please help me to sort out this problem. | |
hello, phpmyadmin have a feature that order the tables by the added in db order DESC how can i order the table to ASC EDIT: I forget to say, i don't have a row that sets added time so i can't order by rows | |
I have a table with ~10,000 records. There is a "viewed" column which contains either 0 or 1. At some point in my code I want all rows = 1 for the "viewed" column. Does it matter if I set all rows to 1 or set all rows to 1 … | |
I need a PHP expression to validate a field value against a list predefined in mysql database So that anything different from that in the database will not be submitted to the database. Looking forward to your assistance. | |
I have a DB with two tables schoolresults; uniresults; Extracts are as follows: [B]schoolresults[/B] stuID Name Surname Gender Schoolname etc. (irrelevant to q) 1001 John Dawson M PretoriaHS 1002 Peter Zondi M Hillcrest (only one entry here for each stuID) [B]uniresults:[/B] stuID course mark symbol seniorCourse 1001 ECO1 54 3 … | |
I'm having some difficulty trying to figure out how to write a certain query. The very basics are that I have two relevant tables: `containers` and `items`. `containers` have the fields: ContainerID, ContainerName, and ContentType. `items` have the fields: ItemID, ItemName, and ContainerID. The easy part of the query is … | |
Does anyone know of any PHP and MySQL code that will help me out? I'm looking to translate my website but without the use of Google, Yahoo, Bing and so on, but would like to try drive the website through a database. The idea was to have friends from around … | |
Hi all, i don't know how to solve this problem...i want store all the data into database. help pls~ thanks~ <!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" xml:lang="en" lang="en"> <head> <link href="/style.css" rel="stylesheet" type="text/css" /> <title>Insert New Institution</title> <script type="text/javascript"> function addRowToTable() { var tbl = document.getElementById('tblAddress'); … | |
Hello I'm having trouble solving the following error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '( )' at line 1 I have a php script which I've written in PHP6 which creates … | |
Hi everyone, I wrote an INSERT for an insert form but for some reason it wont save the data tot he database. In phpMyadmin the rows are taken up with blank nothings. It seems to work but nothing is being stored. code as follows... [CODE]session_start(); $db_hostname = "localhost"; $db_password = … | |
Hi I am trying to write a query that will return the gold, silver, and bronze medalists for each individual-based event. The relational schemas are: EVENT(Event_id, Event_title, Event_team, Event_gender, Sport_id) GAME(Game_id, Gtype_id, Game_year, game_website, game_cancel, Country_id) GAMETYPE(Gtype_id, Gtype_title) SPORT(Sport_id, Sport_title, Gtype, id) CONTESTANT(Cont_id, Rep_id, Comp_id, Team_id) MEDAL(Medal_id, Medal_color, Cont_id) REPRESENTATIVE(Rep_id, … | |
Hello all, I am new to php and thus far i'm love the potential this language has as I learn more about it. I have been trying to write a script to no avail. What I am trying to accomplish is to setup a sms site from web to mobile. … | |
I am having a hard time understanding subqueries. I am pretty sure that is what I need to accomplish my task, but not sure how to put it together. I have a unique ID field that auto-increments, so that a new entry always gets a higher number assigned to that … | |
[QUOTE=nav33n;813365]Where are you inserting the value to client table ?[/QUOTE] I have two tables; school and courses and need to insert records into the courses table that have the same school id as the corresponding record in the school table | |
Hi, I have the following extract from a table called results. StudentID Course Percent 1005 MAM1 63 1006 PHY2 55 1006 MAM1 71 I need to produce a list of student ID's WHO take MAM1 AND PHY2. I first selected all rows where course is MAM1 OR PHY2, but then … | |
Hello Guys....i am very happy to interact with u all. Im new to database. i want to display database names into a dropdown list box and at the same time if i select a particular DB it will display all the tablenames into another dropdown list box... Can any one … | |
i am developing a social networking site as my project in college. i have a doubt on php and mysql.. """ I TWITTER OR FACEBOOK OR IN GMAIL WHEN THERE IS NO ACTION FROM USER(BROWSER) THAT IS, THE USER LOGS IN AND STAY STILL(NOT RELOADING THE PAGE). HOW CAN WE … | |
hi all, i had 4 text boxes. 1.Emp_id 2.Emp_Name 3.Mobile No 4.Blood group and a search Button. so when i fill any textbox or all the textboxes then it should display the required data. For example: If i want some person details. i know only his name.Then if i enter … | |
I save prices data for different days. If a day doesn't have any changes, it is not in the database. table prices date | price ---------------------- 2010-10-01 | 200 2010-10-02 | 200 2010-10-03 | 220 2010-10-06 | 260 2010-10-09 | 190 ... Now I need to prices for statistic purposes … | |
Hi I'm a newbie to PHP and mySQL I have the following problem. I have a database with mp3's which I query by artist name, I then print the results in a table with a maximum of 15 rows. I can then have a next, prev, last and first button … | |
i have a prob to insert the data that i've select from the mysql database into the textbox in php..[CODE]<!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 http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>New Doctor Record</title> </head> <body bgcolor="#FFFFFF" text="#000000"> <p> </p> <?php $host = "localhost"; $uname = "root"; … | |
I have read through the FAQ sticky regarding this topic (and have also searched/read here further on this topic) but I am still receiving the following error: [B][I]Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/a4542527/public_html/index.php on line 8[/I][/B] The scripting for this is basic at … | |
Hi, I have created a program in Python which creates a database called inb104 and loads the data from text files into the mySQL server. The code works perfectly fine. The data is inserted into the table without any issues. The problem is that I would like to place the … | |
hi all, i am trying a query but i am not getting the result properly.. Is there any error in my query.. [CODE]$query ="select Emp_Id,First_Name,Last_Name,Gender,Mobile_No,Email_Id,Blood_Group from Employee where"; if($empid!='') { $query1=$query . " Emp_Id like '".$empid."%' and"; // echo $query1; } if($empname!='') { $query1=$query . " First_Name like '%".$empname."%' and"; … | |
Hi, I am using Tiny MCE as a Textbox to get user generated input which can be bold, italic, underlined, lists and different alignments. When the user submits the form data the information is then saved to a variable like below: [CODE] $jobDesc = mysqli_real_escape_string ($dbc, $trimmed['txtJobProfile']); [/CODE] The I … | |
Hello I want to do that after submitting form it will insert in a table. the table has auto increment field. name of the field is ID. Now how can I get the ID number of that inserted data's ID number. for example I have a table which field are … | |
Hi. I want to have a query as below. [CODE] $sql = "SELECT amount FROM payment WHERE id = '$a'"; $result = mysql_query($sql); $row = mysql_fetch_array($result); $amount = $row['amount']; [/CODE] The value for $a variable is getting from the selection on drop down list. For example, the user select id=11, … | |
Currently I'm working on a microblog just to get familiar with PHP MySQL. I have a pretty big problem though. Here's the php code: [code] function get_all_users(){ $query = "SELECT * FROM ".$this->prefix."users"; if ($stmt = $this->prepare($query)){ $stmt->execute(); … | |
Pretty new at php and working on my class project. I get this error code on my action page for my log in page plus, it does not redirect when the result is wrong. I still get into the members' area. Code below. Thanks "mysql_num_rows(): supplied argument is not a … | |
I tried lot of way to pass the checkbox values from page 1 to page 2. But I only get successes on fruit id, how can pass the fruit charges. [CODE] // how can I pass room charges"$result[room_charges]" to page 2 // page 1 $sql=mysql_query("select * from fruit"); while ($result … | |
Hello. I am making a register/login function, and i want the user to be able to upload files to his account, and can later view these files. I wonder how i can make the upload script insert data in a mysql table only for the current user uploading, i dont … | |
im currently running on windows 7 and i cant seem to find some suitable installation of mysql for python 3.1.2.. any help on this?my professor havent gave me any links on where to download it, anyone would mind helping me on this? or as i tried import mysqldb and i … | |
Hello Everyone, I have triple drop down menu. I want to display the contents of the table based on the third menu selection. The code is in the link [url]http://php.pastebin.com/hgazULxi[/url] I know I need to include a onchange function to <select name="genus"> but as you can see I have a … | |
I couldn't register php session from mysql query. Can you tell me what is the correct method to register php session in mysql field. I tried many ways. Still no solution. [CODE] $sql=("SELECT email FROM people"); $result=mysql_query($sql); $email = mysql_fetch_array($result); echo $email['email']; //could not register this way session_register("$email"); [/CODE] | |
I'm new to mysql and was wondering if someone could help me Im using the following code on search engine on my site I have to table blog and news when i change blog to news and post to article the error disappears but when i change it back i … | |
create table book(bookid int ,title varchar(50),author varchar(50),book longblob); insert into book values(1,'c#','arun','c:/c#.pdf'); BUT this code is not working properly | |
how come my real escape strings are getting entered into my table as blank entries - if i don't escape them, they enter just fine.... Any ideas? [CODE] <?php session_id($_POST['current_email']); session_start(); if (!empty($_FILES)) { $con = mysql_connect("xxx", "xxx", "xxx") or die("cannot connect"); mysql_select_db("xxx", $con) or die("cannot select DB"); $tempFile = … | |
Hi, I have this connction string: [CODE]Private conexion As New OdbcConnection("DRIVER={MySQL ODBC 5.1.50 Driver}; SERVER=localhost; DATABASE=netstore; UID=root; PASSWORD=123456; OPTION=3")[/CODE] I use: Visual Studio 2010 MySQL 5.1.50 When I try to open the connection, this error appears: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver … | |
I have this simple script: [PHP]<?php // MySQL Connection mysql_connect($sql['host'],$sql['user'],$sql['pass']) or die("Unable to connect to SQL server"); mysql_select_db($sql['data']) or die("Unable to find DB"); // Getting rows $select = "SELECT * FROM table WHERE uid = '". $_POST['uid'] ."'"; $data = mysql_db_query($sql['data'], $select) or die("Select Failed!"); // Query results $row = … | |
hi, i am struggling and it will prob be a simple answer but cannot figure it out at all today. checked online but no use. my to create my view i need to compare a column to a yes or no. at the moment i have tried this but no … |
The End.