10,946 Topics
![]() | |
I need help using a mysql user defined function in php. What i want to do is use the mysql function to perform a query to get the count from the inventory table whose movie_id's are equal to the movie_id entered by the user. And then I would like to … | |
hi all, l created php submission script and l wanted to how l can create another script which allows me to view all the submissions made in an orderly manner? | |
Hi all, was wondering if I could get some help with my code. I want to be able to insert a person and details into a database, however i keep getting a syntax error, and not very experienced so was hoping some one here could help. thanks dbConfig.php [code=php]<?php // … | |
I need help using a mysql user defined function in php. What i want to do is use the mysql function to perform a query to get the count from the inventory table whose movie_id's are equal to the movie_id entered by the user. And then I would like to … | |
Can anyone help me figure out why the table movie_actor cannot be created and how to fix it? I know it's the only table without a primary key, but I don't see a need for one. [CODE=MySQL] create table actor ( actor_id int not null auto_increment, first_name varchar(20), last_name varchar(20), … | |
I am making a mysql fulltext search. my database table article1 has ~18000 articles, article2 has ~7000 articles, article3 has ~13000 articles. FIELD cat is a INDEX field Now I want to make a union search. there are 5 groups words put into 3 table, match out the results. But … | |
I keep getting this error when I try to run and print out the results of my database query. I know that this error usually mean that my query failed but i can't figure out what is wrong with it. [CODE=PHP] $genre=readline("Enter Genre: "); $query = "SELECT movie_title FROM movie … | |
Hi guys! i wonder how can i save image path in a string to MySQL, i mean...what instruction i have to use...i want to save it to MySQL and then show it into a picture box. Thank you very much for your help. | |
hi, although, database is connected and admin table of my database consist of 2 rows of data, I still get 0 value for $numRow=mysql_num_rows($result); And mysql_fetch_array doesnt fetch values properly plz can any body help me thx in advance [code]<?php //include_once 'config.php'; /* 1. Got the username and password from … | |
I'm trying to load a CSV file into a database table, but having some issues. [CODE] LOAD DATA LOCAL INFILE 'Report_1.csv' INTO TABLE report_1 Fields terminated by ',' ENCLOSED BY '\"' LINES terminated by '\n\r'( company,key_code,dlr_code,rep_code,dlr_name,first_name,last_name) [/CODE] This gives me the following error: [ICODE] File 'Report_1.csv' not found (Errcode: 2) … | |
In mysql, the table consist of informationtype, status and informationno , [CODE] $information = mysql_query("SELECT * FROM table WHERE informationtype='message' AND status='waiting'"); $row = mysql_fetch_assoc($information); $result=($row['informationno']); [/CODE] The query result are 4 rows. The informationno are 11001; 11002; 11007; 11009; If I intend to express the results in term of … | |
i've been attempting to execute this code , all i got was an error. [CODE]<?php $connect = mysql_connect("localhost","root","") or die ("connection failed!"); mysql_select_db("users") or die (mysql_error()); echo "connected!" $extract = mysql_query("select * from member order by id ASC") or die mysql_error(); ?>[/CODE] and this error appeared : [ICODE]Parse error: syntax … | |
Hi, I have gone over and over the subject and still confused. I currently develop in PHP 5.2.x along with MySQL. (awaiting host to upgrade to 5.3.x, hopefully not to long although on local i develop using php 5.3.5) Currently i use the standard MySQL functions in PHP like: [B]mysql_connect()[/B],[B] … | |
Hello, I've got a problem with simultaneous placement of an order in a webshop. I will start off with a general description of the problem, and provide details after that. **The problem** Orders are stored in the table 'orders'. Each order has a BillNumber, which is obtained via a mysql … | |
On executing the DELETE statement I keep getting the error about foreign key constraint failing. What do I do? | |
I'm creating a html form that allows the user to search for people in a database. I want the form to work with drop down selects and radio buttons. Currently I'm using an if { } elseif {} else if{} format to my script. However this causes a problem because … | |
I have a html form where a user can narrow down his or her's search. For example they want to find a person based off of a number of characteristics, say hair color, eye color, body type. These are selected by a drop down menu and there are additional radio … | |
hi guys as the title which is the best in security mysql_connect() or mysqli_connect() and which one you prefer thank you for help or suggestion . | |
we have a mysql server running from mac os x. i dont like mac but the server has been here forever. a client machine received the 'too m any connections to server' error. my colleague restarted the mysql server - and now the mysql server service will not start. does … | |
I checked my php.ini file and there is no ; in front of extension=php_mysql.dll or extension=php_mysqli.dll. I think the I am getting this error because my figuration File (php.ini) Path is C:\Windows. How would I change it to C:\Apache2.2\php\php.ini? Also, once I have done this do I need to recompile … | |
I am trying to get information from my database that contains a foreign key that relate to another table, I am trying to enter details of an order and then have the customer ID of that order enter automatically from the customer table. [CODE] [B]Customer Table [/B] CREATE TABLE IF … | |
Hi, I have a fully pledged membership system and want to integrate my own user referral system but want some tips, advice really on the logic of it. Basically already registered users on my site will have the option to refer people, only registered users. I will try to explain … | |
Hey Guys, I need some help with Deleting data from a MySQL . Currently I have, Two PHP files. the First is the main page. [CODE]<?php $host=""; $username=""; $password=""; $db_name=""; $tbl_name=""; mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); $sql="SELECT * FROM $tbl_name"; $result=mysql_query($sql); ?> <p>This Page Refreshes Every … | |
Hello I have been using SQL for a number of years, but I am struggling with an intermediate query. I want a record to be displayed as below [ICODE] 1 Ademola Adebayo 4 Women @ West Street Member 2 Christine Adebayo 4 Women @ West Street Leader [/ICODE] when I … | |
I want to make a query that would return data about students who failed in a specific course, the report is looking like this- studId, studName, last grade, year last course was taken, num of fails in this course. so I'm having problems writing the correct SQL query to get … | |
How do you implement in java to select only data from a Column i a database using java | |
Hi, i am try to display and insert info on a person into my database but i keep getting this error whenever i enter the info You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use … | |
I have textarea comming from mysql. In the backend the user tyes a letter type format in a textarea They ise Enter to make new rows etc __________________________________________________ Dear john Welocome to our website hope you find it usefull Thank you The Team ___________________________________________________ When I pull the data from … | |
Greetings everyone, I'm a noob here. I could use some help designing part of a MySQL database I'm working on. This is an event database, so think of say a conference. I have sessions and every session has a session_type. A session_type might be a Keynote speech or a Workshop. … | |
Hi, I have been left in the lurch with a few php scripts on my site and I'm the first to admit coding is not my strong point! I have managed to fix most of the issues, but I am stuck on the following. Basically, I want to query the … ![]() | |
here is my code i and got this error while running it [CODE] Notice: Undefined index: Reg_no in D:\wamp\www\mohammed\geo.php on line 12 Notice: Undefined index: Reg_no in D:\wamp\www\mohammed\geo.php on line 12[/CODE] [CODE]mysql_connect("localhost","root",""); mysql_select_db("new"); $query= "SELECT SUM(Reg_no)+SUM(class) FROM fee_info GROUP BY Reg_no"; $result = mysql_query($query) or die(mysql_error()); // Print out result … | |
hey! i need to create a customised table "Employee" in which i have to insert employeeid,employeename and salary...on inserting the salary,the table should automatically calculate Hra(10% of basic salary),DA(9% of basic salary) and hence calculate net salary...so...plz guide me...how to do this? | |
Hi I've been using mysqli and recently moved a website to a new server hosting company. They have recently informed me that the version of PHP they use does not support mysqli. I'm not really sure about the why/why not's etc but could I just change all instances of mysqli … | |
Hello, I have a problem with this script when i will check it in the browser, the output is : "Warning: mysql_query() expects parameter 1 to be string, resource given in C:\xampp\htdocs\doto\php\new_case.php on line 8 FOUT SELECT * FROM disp_type ORDER BY t_naam ASC Resource id #3" [CODE]<?php $host="localhost"; $username="TEST"; … | |
Hi there, I have a very basic CMS system that I wish to update within itself and on the same page to cut down the amount of pages it gives me. At present I have a content box and an edit button, this box is validated by JS and if … | |
Hi, i am still stuck in SQL query about how to retrieve data from two tables. I have two database tables- Forecast [CODE=text]------------------------------------------------------------------- TimeStamp | Temperature | Rainfall | Wind | City_Code ---------------------|-------------|---------|-------|------------- 2011-03-13 10:00:00 |22.2 (degC) | 0 | 7 | 1 2011-03-13 11:00:00 |23.1 (degC) | 0 | … | |
Is this a correctly made JOIN: [CODE] // Build SUBJECT navigation and gather SUBJECT data here-------------------------------- $sqlCommand = "SELECT id, linklabel, pos FROM subjects INNER JOIN pages on id = pages.subjectid ORDER BY pos ASC"; $query = mysqli_query($myConnection, $sqlCommand) or die (mysqli_error()); [/CODE] ? Klemme | |
I am creating a cms, where I have a Global horizontal navigation(SUBJECTS) in the top, and a local navigation(PAGES) on the left, all database driven. First I decide if either a subject or a page has been set, to display the correct information: [CODE] if (isset($_GET['sid'])) { $subjectid = ($_GET['sid']); … | |
![]() | Hi all, I'm new and I currently am developing a website on fishing fred's fishing. The site is an experiment for a portfolio ect. There is a feature, the guestbook. The Guestbook is managed by a MySQL database and the PHP is responsible for creating and echoing the data. I … ![]() |
I have fields UserID, Status and etc. The status of the user will be either active or inactive. I want to count how many UserID of Active users only. I have a code here but it's not working..It says "Invalid or Unqualified reference". Can you please help me check this … | |
Hey guys, I need some help with selecting 2 Tables from a MySQL database. Can anyone help. Currently I am using this, and I want it to be able to select from another table called Admin and Display the Admins under admins in my table. [CODE]<?php $host=""; // Host name … | |
Hi guys, I am working on a web application project where I use MySQL database. Now I need to export my database/table as a CSV file and I'm using SSH client to access my MySQL. I have no clue how to export it. I would really appreciate if someone could … | |
Hi I am having a problem with code i have created to delete a customer from my database, would be grateful if someone could tel me where i have gone wrong [CODE]<?php include ('db.php'); $cid=$_POST["cid"]; $cname=$_POST["cname"]; $cusadd1=$_POST["caddress"]; $cusadd2=$_POST["caddress1"]; $cusadd3=$_POST["caddress2"]; $ccounty=$_POST["county"]; $custpc=$_POST["cpostcode"]; $custele=$_POST["ctelephone"]; $cusemail=$_POST["cemail"]; print $cid; $str="delete from customer CustomerName='$cname',CustomerAddress='$cusadd1',CustomerAddress1='$cusadd2',CustomerAddress2='$cusadd3',County='$ccounty',CustomerPostCode='$custpc',CustomerTelNo='$custele',CustomerEmail='$cusemail' where … | |
Hello everybody i am new to PHP and trying to learn more and more. now i am trying to make a reservation system i solved my date time problem but now i am stick on comparing two date from my form with two dates on my database here is my … | |
[CODE]SELECT * FROM question LEFT JOIN answer ON question.Que_ID=answer.Que_ID AND question.Que_Answer1=answer.Ans_Answer1 AND question.Que_Answer2=answer.Ans_Answer2 AND question.Que_Answer3=answer.Ans_Answer3 AND question.Que_Answer4=answer.Ans_Answer4 AND question.Tes_ID=7 AND answer.Use_ID=1[/CODE] This should only show record that are use_ID=1 and Tes_ID =7. But in MySQL, there are data for test ID=8 and etc. isnt it only suppose to be 7. | |
Hi I am having a problem with code i have created to delete a customer from my database, would be grateful if someone could tel me where i have gone wrong [CODE] <?php include ('db.php'); $cid=$_POST["cid"]; $cname=$_POST["cname"]; $cusadd1=$_POST["caddress"]; $cusadd2=$_POST["caddress1"]; $cusadd3=$_POST["caddress2"]; $ccounty=$_POST["county"]; $custpc=$_POST["cpostcode"]; $custele=$_POST["ctelephone"]; $cusemail=$_POST["cemail"]; print $cid; $str="delete from customer CustomerName='$cname',CustomerAddress='$cusadd1',CustomerAddress1='$cusadd2',CustomerAddress2='$cusadd3',County='$ccounty',CustomerPostCode='$custpc',CustomerTelNo='$custele',CustomerEmail='$cusemail' … | |
Hi, I my admin area, where the administrator can create a new page, it is also possible to decide the position of the link. It is a menu in the left side of the screen, one link on top of the other, very simple nav. I have a dropdown list … ![]() | |
Hi all, I have a java database application which mainly deals with database operations. Im concerned about the performance, as I have many update statements. As there are many records, each row has to be updated with a calculated value. So can anybody help me out to suggest for efficient … |
The End.