703 Topics
| |
Hi All, These days I am implimenting a Hotel Room Reservation system. I have a small problem in Check Availability' page. below I listed my database structure. *rooms* rid int(11) <--- AI name varchar(255) ppn varchar(50) facilities mediumtext *reservations* resid int(11) <--- AI rid int(10) arrival date departure date System … | |
Hi ! I need to have a single mysql query which should get COUNT of two different values in a single field, suppose i have a field in a table 'approved', and there are only two values ie. approved=0 or approved=1, and have suppose 100 rows for them,so how to … | |
I have MySQL search query which takes input from drop down values and pass on values to my search query. This works perfectly on my website. But the same when I run on my Mobile it does not give me results(blank) as well its not consistent in displaying results, means … | |
can i use submit button inside a form to access a function in other php file?because i have 2 buttons on same page but want them to do different function..one to query database other to update table.. | |
Hello thanks in advance i working on project i used query select project_table.project_id as proid,resource_request.*,sum(resource_table.resource_budget)as resourcecost,resource_table.* from project_table left join resource_request on resource_request.project_id = resource_request.project_id left join resource_table on resource_table.resource_id = resource_request.resource_id GROUP BY proid ORDER BY proid DESC its worked but resourcecost is displaying for all project id if … | |
Sir, i have a little problem regarding my queries.. I try to display data from two different table using left outer join. but I found some error.. here's my code please check and tell me what is wrong.. f(isset($_GET['id'])){ $id = preg_replace('#[^0-9]#i','',$_GET['id']); $result = mysql_query("SELECT A.cus_id, A.complaint, A.admin, A.datetime, B.firstname, … | |
hello sir, i have a php code like <?php $count = 0; foreach($_POST as $item) { $count += (is_array($item)) ? count($item) : 1; } // echo "Items = $count"; $db=$_POST["db"]; $skills = explode(",", $_POST["skills"]); $table = explode(",", $_POST["table"]); $city = explode(",", $_POST["city"]); $region = explode(",", $_POST["region"]); $country = explode(",", $_POST["country"]); … | |
I am currently confused and not sure why. I believe I have stared at this for to long. I am currently just trying to populate a ComboBox with the data that is read in from a SQL DB through a SQL query. Currently I have the below code. I am … | |
i want to display first priority wise after that remaining data if no priority will display all data by select DISTINCT s.Companyname,s.id as companyid,s.LogoImage,s.LogoPath,s.Url,ck.MainCatagory,c.city,st.state,sub.Subcatagory,sub.MainCatid,p.priority,rc.RelatedCatagory from spa s left join relatedcatagories rc on rc.spaid=s.id left join catagorykeywords ck on ck.id=rc.mainCatagoryid left join subcatagorykeywords sub on sub.id=rc.RelatedCatagory left join city_place cp on … | |
hi i want to insert date through mysql query <?php require_once('auth.php'); require_once('connection/config.php'); //Connect to mysql server $link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD); if(!$link) { die('Failed to connect to server: ' . mysql_error()); } //Select database $db = mysql_select_db(DB_DATABASE); if(!$db) { die("Unable to select database"); } ?> <form method ="post" action =""> … | |
Hello I have use 'LIKE' query in Model $this->db->like('job_title','keywords','both'); $query = $this->db->get('job_description',$data); which generate Query Output like SELECT * FROM (`job_description`) WHERE `job_title` LIKE '%keywords%' LIMIT 1 **Problem:** How could i remove the LIMIT that automatic generate in Query **OR** can i given Infinite LIMIT in CI Query. Can you … | |
index.php code <html> <head> <meta charset="UTF-8"> <title>Our Local site</title> </head> <body> <form action="welcome.php" method="post"> <input id="t1" name="t1"type="text" placeholder="table name"><br> <input id="s1"type="text" name="skill[]"placeholder="skill or item or spec"> <input id="s2" type="text" name="skill[]" placeholder="skill or item or spec"> <input id="s3" type="text" name="skill[]" placeholder="skill or item or spec"> <input id="s4"type="text" name="skill[]" placeholder="skill or item … | |
I tried updating my data like so but it doesn't work <?php require("config.inc.php");//this piece of code us for authentication and it works fine. if(!empty($_POST)) { /** the values below in the POST are valid not empty values **/ $shell = $_POST['shell']; $reporter = $_POST['reporter']; //query $query = "UPDATE `shellingdb` SET … | |
Hi Guys I am trying to display friends of a logged in user for my website, the user(person1 is friends with person2 and I would like this to display when either person1 or person2 log in( this should be under the hyperlink) Friends. and also to be able to see … | |
i'm new learn php and mysql and i got stuck can't get better logic for my brain i want to get message from page if i type url like **index.php?user=user1** and page will show with data table and if username doesn't exist and page show no username found so this … | |
This is the scenario: I have one table (main_tbl) with columns RECID(primary key),JOBNAME(text),STATUS(text). Now, I created an application that will query to the database and get one jobname and update the status. How can I make sure that multiple users wont get the same jobname when they executed the query … | |
HI, I a have inhrited administration of a work database. we currently have the ability to export data to a xls file from a customers table, but i want to add employers information from the employers table i.e employers name, address etc along with each record exported. This section deals … | |
what i need is a single set of output for each procedures, but my this query is giving me 2-3 sets of answers, between this time period.. i need distinct set of answers.. if(isset($_POST['submit'])) { $to= $_POST['to']; $too = date("d/m/y",strtotime($_POST['to'])); $from= date('Y-m-d');; echo " <br><h2> PROCEDURE REPORTS UPTO <b>'$too' </b> … | |
how to edit in the post in php? i m using update query but no working? can anyone suggest me any idea and please give me suitable example | |
here i have 3 tables. i want to display OfferDescription,OfferImage,offerPath based on spaid.becaz offerimage and offerdescription are added by using array.so its in different table. if i add companyname and 2 offerimage and 2 offerdescription its added in this 3 tables.after i have to display based on spaid value.i tried … | |
I have a php page which is logged in with a user account. Now i want to change my password here, also I'm getting two errors here. "Notice: Undefined variable: password in C:\xampp\htdocs\fyp\cms\cms-settings.php on line 73 Warning: mysql_affected_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\fyp\cms\cms-settings.php on line … | |
for pagination i need to display number of data.here is my query but am getting error like 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 'st.state)as num from spa s left join relatedcatagories … | |
I have a 2 column SQL table as follows: **Product Price** Drill 20 Hammer 15 Screwdriver 5 Screws 2 Nuts 3 Bolts 6 I eventually want to embed a PHP array into a Google charts script. But first, how do I pass my SQL query into an array? My code … | |
Hello, I need to run a report against a database, and I am having a difficult time thinking of a way to run a particular report. What I need to do is run a report which selects students that have no course registrations for three consecutive semesters. The semester table … | |
I have a bunch of insert querys running and some of them fail with a duplciate entry. I want to see a log where it says "Error: Duplicate key" and that tells me the EXACT INSERT query that fails so I can see what keys are duplicated. Thanks | |
Hi all I need some advice making my query work properly. I already played around it a dozen of times and still can't get it work. So as my last option im here:) . what im trying to achieve is sum all amount of a particular rows and display the … | |
Hello Below is the schema with sample data of table es_preadmission ![b3b82faffc743e08d6d6329b3a7b956d](/attachments/large/2/b3b82faffc743e08d6d6329b3a7b956d.JPG "b3b82faffc743e08d6d6329b3a7b956d") I am trying to get the number of male and female students from each categories (GEN, SC,ST,OBC), bpl, sgc, handi,ser_cat class wise. Example class 1 => GEN => Male = 3, class 1 => GEN => Female … | |
i have 3 tables and i want to display companyname,maincategory,city,place 1.SELECT `id`,Companyname from spa 2.SELECT `id`, `mainCatagoryid`, `RelatedCatagory`, `spaid` FROM `relatedcatagories` SELECT `id`, `MainCatagory`, `name`, `size`, `path` FROM `catagorykeywords` SELECT `id`, `Subcatagory`, `MainCatid` FROM `subcatagorykeywords` 3.SELECT `id`, `city_id`, `state_id`, `spaid` FROM `city_place` SELECT `city_id`, `city`, `state_id` FROM `cities` SELECT `state_id`, … | |
I have a table called "mytable". The columns are Time_Stamp (datetime) PK Time_stamp_ms (int) PK data1 (int) data2 (int) data3 (int) data4 (int) data5 (int) data6 (int) cycle (int) name (varstring) I want to order by Time_Stamp and Time_stamp_ms and then each time cycle reaches 1, I want to get … | |
| I have a Visual Studio form that is linked to a SQL database table. I am adding a query via a tool strip to search the database and I have the following text boxes the user can enter information into: Client, Project Number, Project Manager, ServerArchived, PaperArchived. The user does … |
The End.