7,494 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for neorahav

Hi all, I really need help for fixing one of the issue in my project. We have a passenger table which is used for Airlines operation. We need to sort the passengers by their seat numbers. Seat numbers are in format <1/2digits><1Alphabet> eg: 1A, 1B, 1C, 22A, 11B, 24D, 9A, …

Databases oracle
Member Avatar for hfx642
0
142
Member Avatar for BenzZz

I was wondering if the following in terms of tables and keys is possible: Login([U]username, date_time_login[/U]) Customer([U][I]username[/I][/U], surname, ...) Driver([U][I]username[/I][/U], surname, ...) Admin([U][I]username[/I][/U], surname, ...) Booking([U]b_no[/U], [I]cust_id[/I], [I]driver_id[/I], ...) Primary keys are underlined and foreign keys are in italics. I want the Customer, Driver and Admin username primary key fields …

Databases mysql
Member Avatar for BenzZz
0
322
Member Avatar for jadiebabe

Hi, I am actually an HR consultant with minor experience in SQL, have asked our developers for help and received the query below, but it is not working - Please help!!! My Client records training for employees, these employees need to be recertified at certain dates. I need a report …

Databases mssql
Member Avatar for DemonBob
0
220
Member Avatar for Turismosan

I want to write a program in C# that will populate the fields in a database that I have created, for example... I have fields in the database such as TotalWins, Name and TotalCredits. In the C# program, I want to have users enter these values into textboxes and when …

Databases mssql
Member Avatar for Netcode
0
82
Member Avatar for tuse

I need to check if a databse user exists and if not, create that user. However, I do not know the statement to check if a user already exits. How to check if a user already exists in MySQL?

Databases mysql
Member Avatar for Offirmo
0
1K
Member Avatar for jeevsmyd

I used to write PL/SQL programs in oracle 9i.Since windows 7 doesnt support it, switched to oracle 10g express edition. All my SQL programs are alright. But I cant put mutiple queries on a single run though. Like insert into many rows. But PL SQL programs are going crazy. Too …

Databases oracle sql
Member Avatar for hfx642
0
525
Member Avatar for cisumma

Hello all. I have never updated a single column in a specific record. I am using Apache derby embedded database. I have used the update prepared statement to up date a single field with the String value but it updates all the like of every record. How can I update …

Databases apache oracle
Member Avatar for cisumma
0
141
Member Avatar for newbie14

Dear All, I got a query where I would like to select the clientName from tblClient but with condition that this clientID does not exist in another table call tblCDSValidity. I tried like this but it failed. [CODE] SELECT tblClient.clientID, tblClient.clientName FROM tblClient,tblCDSValidity Where tblClient.clientStatus='a' And tblClient.clientID!=tblCDSValidity.clientID ORDER BY tblClient.clientName …

Databases mysql
Member Avatar for newbie14
0
174
Member Avatar for Draucia

I have a question secuirty. Is it safe enough to do: [CODE] $fname = mysql_real_escape_string(htmlentities($_POST['fname'])); $lname = .....($_POST['lname'])); etc [/CODE] and insert it into the table like: [CODE] mysql_query("INSERT INTO North_America (first_name, middle_name, last_name, email, phone, country) VALUES('$fname', '$mname', '$lname', '$email', '$phone', '$country') ") or die(mysql_error()); [/CODE] Or do I …

Databases mysql php
Member Avatar for jlego
0
241
Member Avatar for iamthesgt

This is homework. I have to create two tables with certain constraints. However, I keep getting syntax errors, and I really have no clue exactly how to format it because there are so many different 'templates' out there. Here is what I have so far. [CODE] create table Departments (Department_ID …

Databases oracle sql
Member Avatar for dan420
0
191
Member Avatar for smiley4080

Sign(MemberID, MemberName, ActivityID, ActivityName, SessionID, CoachID, CoachName, Day, From, To) The table Sign record the enrolment information of sports club members in sports activities. The information recorded are the the member name, member id, the activity name, the activity id, a session id that is unique within the same activity, …

Databases session
0
104
Member Avatar for staticwave

I recently inherited a website and they have a simple back-end area which was created using phpmaker. The back-end displays various MYSQL database tables. There are two tables which hold registration information related to promotions/contests the company runs online. The client wants to begin archiving the registration data monthly, but …

Databases mysql
Member Avatar for smantscheff
0
1K
Member Avatar for 650U

I have a mysql table named 'customer'. serialnumber (int), name(varchar), gender(varchar) are the table fields. I have a int variable a = 2. I want to fetch the value from the table when serialnumber = a. That is when the serialnumber = 2 it should display the particular customer's name. …

Databases mysql session
Member Avatar for |-|x
0
191
Member Avatar for dinilkarun

Hi All, I am updating a column in a table through SQL+ using Select to_char(systimestamp,'YYYY/MM/DD-HH24:MI:SS.FF3')from dual; The same field when updated through an application has a time offset of 4hrs. Select dbtimezone from dual; returns DBTIME ------ -04:00 I want to form a statement which will update the field with …

Databases oracle
Member Avatar for hfx642
0
122
Member Avatar for sweetyp

How do i insert multiple rows in database. for example: I have 3 list: list1: a1,a2,a3,a4 list2: b1,b2,b3,b4 list3: c1,c2,c3,c4 I want to insert a1,b1,c1 in 1st row. a2,b2,c2 in 2nd row,... How do I write one sql insert statement to do that?

Databases mssql sql
Member Avatar for joe_bolla
0
753
Member Avatar for Zedith

Hi I have a php code with a string that I'm trying to find in an MySql database. But...I'm getting empty result set. The database has a varchar column named news_url with this in it "/is/frettir/titill". What I'm trying to do is search for this row with that string in …

Databases mysql php seo
Member Avatar for pritaeas
0
176
Member Avatar for amie900218

hai, can somebody help me, how to change root password for mysql in CPANEL? i tried to put my website online, but it send message : Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in /home/akmajuco/public_html/_class/cms_class.php on line 9 Access denied for user 'root'@'localhost' (using password: YES) …

Databases cpanel mysql
Member Avatar for amie900218
0
252
Member Avatar for MDanz

With the below query I'd get the results one and three. How do I get the results for `sid`; 15 and 17? I can't use a WHERE because I won't know the `sid`. A better way of explaining is, how do I LIMIT per `sid` without grouping? [CODE]mysql_query("SELECT * FROM …

Databases mysql
Member Avatar for smantscheff
0
154
Member Avatar for SQLpower

Hello, folks. Well, I can't get my head around that particular function. I want to calculate and then return the total amount of hours assigned for a given stage_no. I got confused. Do I have to use COUNT(*)? [CODE]CREATE OR REPLACE FUNCTION total_numbers_hours(hours NUMBER, stage_no NUMBER) RETURN NUMBER IS return_val …

Databases oracle sql
Member Avatar for SQLpower
0
225
Member Avatar for fatzky_04

Hello all! I'm making a Applicant Record Keeping System. I'm a newbie with MS access. And i'm having a really hard time understanding how queries work. I have three forms: (Sequentially) Background Checking Criteria.. Document.. So, this forms are for one applicant and they have common details. Background Checking's common …

Databases microsoft-access
Member Avatar for adam_k
0
177
Member Avatar for moneypro

Hi, I am Shoaib. I have an project for my database course. I have chosen Dmoz directory listing(easiest project). I have to design the database first. [B]Please can someone tell me where I will start? [/B] I will appreciate any clue or hints.

Member Avatar for moneypro
0
204
Member Avatar for Draucia

I know this is php but it has MYSQL in it and I didn't really know where to post it. :$ The problem is, I have a check that checks if the username and password inputted matches the database's username and password. [CODE] if ($username==$dbusername&&$password=$dbpassword) { echo "Welcome, <b>$username</b>."; }else{ …

Databases mysql php
Member Avatar for Draucia
0
160
Member Avatar for mrhankey

hi, been trawling the web trying to find anything on this but cant find anything to hand. my query:[CODE]SELECT monthlycommission.DatePaid, monthlycommission.MonthPaid, monthlycommission.YearPaid -1 year FROM monthlycommission where YearPaid = now() group by MonthPaid order by DatePaid ASC[/CODE] basically this query works however it is not what i want it to …

Databases mysql
Member Avatar for urtrivedi
0
125
Member Avatar for solomon_13000

I created a stored procedure as below: [CODE] DELIMITER$$ CREATE PROCEDURE updateCorporateDetails(IN companyName VARCHAR(30), IN rocNo VARCHAR(20), IN address VARCHAR(30), IN postalCode INT, IN state VARCHAR(20), IN country VARCHAR(20), IN contactNo VARCHAR(20), IN email VARCHAR(20), IN fax VARCHAR(20), IN lastUpdate DATETIME, OUT total INT) BEGIN DECLARE var1 INT; SET @var1 …

Databases mysql sql
Member Avatar for solomon_13000
0
866
Member Avatar for nameunknown

Hi everyone, we have constructed a content management system that gets updated quite frequently and is used by many clients for their day to day opperations for their websites. We have decided to build a section of the CMS with additional modules that we will host on our cloud and …

Databases cms coldfusion mssql sql
Member Avatar for BitBlt
0
231
Member Avatar for Gobble45

Hey guys, only new to Daniweb, so pardon me, if i seem too "nooby" for you guys. I am building a website, and currently am working on the "members area" i have a database named "users" with fields "name", "username", "email", and "password". i am running a php script, and …

Databases mysql php sql
Member Avatar for simplypixie
0
257
Member Avatar for edw211

Hello everyone, I'm new to the forums and also a newbie to database design studying at university. I am attempting the apparently notorious video chain database project. Below are the project specifications: "Consider the operations of a video sales and rental chain. Such a company purchases videos from vendors and …

Member Avatar for griswolf
0
647
Member Avatar for techker

hey guys this is the structure of the Db: `Ex_ID` int(11) NOT NULL auto_increment, `N_Etudiant` varchar(25) NOT NULL, `Professeur` varchar(50) NOT NULL, `Foyer` varchar(50) NOT NULL, `Motif` varchar(50) NOT NULL, `Date` date NOT NULL, `Notes` text NOT NULL, `Autre` varchar(150) NOT NULL, so basically N_Etudiant is a student name.. so …

Databases mysql
Member Avatar for techker
0
94
Member Avatar for twitah

[CODE]<?php include('header.php'); foreach($_POST as $key => $value) { $protectie[$key] = filter($value); }if(isset($_POST['submit']) && $_POST['type'] == "facebook") { $num1 = mysql_query("SELECT * FROM `facebook` WHERE `facebook`='{$protectie['url']}'"); $num = mysql_num_rows($num1); if($num > 0){ $mesaj = "<div class=\"msg\"><div class=\"error\">Facebook Pages has been added before!</div></div>"; }else{ mysql_query("INSERT INTO `facebook` (user, facebook, title, points, cpc) …

Databases mysql
Member Avatar for smantscheff
0
169
Member Avatar for ppetree

Hey All... This query is waaaay outside my skill set so I can't even fathom how to do this other than the "brut force" method and that's way to slow for my purpose (a mobile app). I have two tables, `Categories` and `Articles`: `Categories` has: `id`, int auto-increment `name` text …

Member Avatar for smantscheff
0
210
Member Avatar for tania123123123

Below is a sceanrio.. i need some help to do the following... i have done bits but i think i dont understand and need some guideance.. can anyone help me to find the.. 1) entities 2) attributes 3) realtionships withing the scenario below? SonicLive is a UK company that is …

Member Avatar for roshan605
0
180
Member Avatar for mrhankey

hi i have a query which should work however it returns nothing. i have at least 2 entries where completed = No and the date of the task is today. the code is: [CODE]SELECT count(TaskID) AS DueToday, DATE_FORMAT(`TaskDueDate`,'%d.%m.%Y') AS XLABEL FROM tasks WHERE 'XLABEL' = CURDATE( ) AND Completed = …

Databases mysql
Member Avatar for mrhankey
0
175
Member Avatar for begueradj

Hello I found this : [CODE]INSERT .... ON DUPLICATE KEY ...[/CODE] What does [B]'ON DUPLICATE'[/B] mean ? Thank you

Databases oracle
Member Avatar for rotten69
0
67
Member Avatar for phoenix_2000

Hello, I'm currently working on a database application where the application can show a number of risks and counter-measures. Now i'm updating the application so it is possible to upload new risks without having to open the database. However, each risk has an riskID, a number that was being put …

Databases mssql
Member Avatar for phoenix_2000
0
136
Member Avatar for architact

Hello Guys I want to connect two databases at the same time but it looks like the php is only picking up the second database. One database is on my localhost and the other one is on server, I want to transfer the data from my localhost database to the …

Databases mysql
Member Avatar for vamsy143
0
240
Member Avatar for Stefano Mtangoo

Is it possible to export MySQL database to SQLite? If possible, how do you do that?

Databases mysql sqlite
Member Avatar for Stefano Mtangoo
0
76
Member Avatar for parimalnarayan

Hi! I have made a website which allows users to register. I want to check the functionality of the site, so I want to create a database on my computer using mysql and link it to my site. I have already created the registration form and login form, but I …

Databases mysql
Member Avatar for nHulk
0
229
Member Avatar for Draucia

I just started learning mysql (today) and I figured out how to insert data into a table and how I am learning how to echo the data. Here is what I have so far: [CODE]$email = mysql_query("SELECT * FROM mail") or die (mysql_error()); $row = mysql_fetch_array($email); echo $row['email'];[/CODE] This does …

Databases mysql
Member Avatar for smantscheff
0
119
Member Avatar for mrhankey

hi, i was wondering if any you guys knew of a simple way to sync from an access database offline to a mysql online database? currently my system is running on php/mysql. there is another company who have a system that uses an access database behind it. i can access …

Databases mysql
Member Avatar for mrhankey
0
298
Member Avatar for TNvol66

[CODE][/CODE]I was having trouble wording my title. I'll try my best to describe my problem. I'm a SQL newbie, so go easy on me.. I'm trying to match records that "doesn't exist" between two relational tables. For instance, if I have two tables. [CODE]Table 1: Client_ID Client_Name Table 2: Purchase_ID …

Databases oracle
Member Avatar for hfx642
0
139
Member Avatar for gozlemci

Hi There; I have a MS-SQL 2005 in my computer. There is a [I]person [/I] table, and this person table have three columns; [I]name[/I], [I]surname [/I]and [I]address[/I].They are nvarchar(50). I hold the data of my company on it. User can make some queries over it via HTML. PHP code does …

Member Avatar for gozlemci
0
3K
Member Avatar for divyakrishnan

Hi, I[B] have a problem with the following query select tbl_employee.E_Name,sum(tbl_Salary.Amt),tbl_Dpt.DeptName from tbl_employee inner join tbl_Salary on tbl_employee.eid = tbl_Salary.eid inner join tbl_Dpt on tbl_Salary.eid = tbl_Dpt.eid where tbl_employee.eid ='E101' When the query is executed,the following error is displayed "Column ' tbl_employee.E_Name' is invalid in the select list because it …

Databases mssql sql
Member Avatar for adam_k
0
1K
Member Avatar for wezel

Hello friends, I am looking for a bit of help. Here is the scenario. I am trying to compile sales data for a number of stores from multiple databases and import them into excel for the current month by day. I have a field for date and sales. The problem …

Databases microsoft-access
Member Avatar for wezel
0
128
Member Avatar for emily-bcot

[CODE]select * from Table where data=2.6[/CODE] After running the above query, db returned an empty result set. But Seen from table, there are many rows matching data=2.6 criterion. Here the type of 'data' column is FLOAT. If changing the value to an integer like 'where data=2', the matched result sets …

Databases mysql sql
Member Avatar for smantscheff
0
217
Member Avatar for TonyG_cyprus

Hi, I have a mysql database for stock records in the pub I work in. The code below displays the list of items and sizes, what I need is to be able to update several rows by subtracting the number in the qty column from the bal column in the …

Databases html-css mysql
Member Avatar for urtrivedi
0
165
Member Avatar for bikashdas

Hello. I stored dateFrom & dateTo as String '11/11/2011' and '11/25/2011' [mm/dd/yyyy] format. now when i fired query as below [code] select (case when pp_send_date_to_district between '11/01/2012' and '11/25/2012' then 'Dec/2012' else 0 end ) as Months, sum(case when pp_send_date_to_district between '11/01/2012' and '11/25/2012' then 1 else 0 end ) …

Databases display mysql
Member Avatar for smantscheff
0
193
Member Avatar for tanha

Hello everyone, I am creating UDF using CREATE FUNCTION statement. The question is how can I make them globally accessible to all the databases, rather than specific database? Regards,

Databases mysql
Member Avatar for smantscheff
0
148
Member Avatar for jshenn

A table contains results of a match. Each match is a series of 7-9 games (different leagues share same match schedule table and play different best of "x" matches), such as: id teamA game1 game2 . . . game9 Need to calculate average based on game total and number of …

Databases mysql
Member Avatar for smantscheff
0
278
Member Avatar for ppetree

This seems like it should be a simple query but I think I have my eyes in backwards... Give me all the users living in Jefferson, Bingham, Butte, Bonneville and Madison counties in the state of Idaho. [code]SELECT * FROM table WHERE county='Jefferson' OR county='Bingham' OR county='Butte' OR county='Bonneville' OR …

Databases mysql
Member Avatar for ppetree
0
108
Member Avatar for Smeagel13

So here's the design: Workout_TBL(Workout_ID, Type, Notes, Date); Exercise_TBL(Exercise_ID, Exercise_Name, Type) Cardio_Entry_TBL(Cardio_Entry_ID, Workout_ID, Exercise_ID, Duration, Pace, Distance, Calories, Notes) - FK Exercise_ID and Workout_ID Strength_Entry_TBL(Strength_Entry_ID, Workout_ID, Exercise_ID, Weight, Repetitions, Sets, Notes) - FK Exercise_ID and Workout_ID A workout has many exercises associated with it of a certain type, which works, …

Member Avatar for smantscheff
0
136

The End.