7,494 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for jakesee

Hi, I have a table `Categories` with fields (category_id, category, parent_category_id) I want to write in a single query to replace the parent_category_id with the corresponding category_name. [CODE] // OBJECTIVE: To return all category names and parent category names // if category is root (no parent), parent category name is …

Databases mysql
Member Avatar for OVOVO
0
392
Member Avatar for MoreBloodWine

Would someone please try & modify this query in a way that it shows the count for how many users have registered for the current day ? So like right now it should display a count of 2 and then come midnight it would show 0 and then incrementally go …

Databases mysql unix
Member Avatar for MoreBloodWine
0
134
Member Avatar for LianaN

Hi! I've downloaded the MySQL Server 5.1 and developed a small database using the MySQL Command Line Client. However, now I must update a structure of some tables, include some foreign keys, etc. In my opinion, it is not very comfortable to use the MySQL Command Line Client and the …

Member Avatar for LianaN
0
183
Member Avatar for mangel.murti

Hi ,all i have two field one is checkin date and other is checkout date . i have table structure as i attached jpg file here. when user enter dates i have to show his season on the basis of hotel id? note:user can enter any date checkin date and …

Databases mysql
Member Avatar for smantscheff
0
75
Member Avatar for joshisumitnet

Dear Friends, I want to know that how can we compare two hebrew string in MySQL database? I tried and search a lot on net but still could not found the answer. My website is dealing with Hebrew(main) and English as well. So please let me know How can I …

Databases mysql sql
Member Avatar for smantscheff
0
570
Member Avatar for ben.matthews18

I have created a very basic database in 'MySQL Workbench' just as a test.. This is the SQL it produced - [CODE]CREATE TABLE IF NOT EXISTS `CustomerOrder` ( `OrderID` INT NOT NULL AUTO_INCREMENT , `OrderDate` VARCHAR(45) NOT NULL , `ProductName` VARCHAR(70) NOT NULL , `ProductCost` VARCHAR(45) NOT NULL , PRIMARY …

Databases mysql sql
Member Avatar for drjohn
0
105
Member Avatar for i.connect

I am in the process of designing a Database structure for a project. And i am stuck at a particular design decision. Ive searched quite a lot on google but not able to find a satisfactory answer. I am looking out for something like “TableSpaces” (like in Oracle) to use …

Member Avatar for smantscheff
0
164
Member Avatar for breto

I'm new to Access 2007 need some help in regards how to build expression for the following - Product Price $: * Product Quantity - % (any number). Started with the following expression: Total Cost $: [Product $:] * [Product Quantity:] - [Discount %:]

Databases microsoft-access
0
86
Member Avatar for roachae

I have a MySQL query that's using SUM() to take the sum of a column, BUT what I need it to do is basically this: If the string in another column is 'BUY', then I want to add the number in my column, but if this other column has 'SEL', …

Databases mysql
Member Avatar for roachae
0
141
Member Avatar for Lennyrogal

Hi! I do have this assignment I have been working on for a while. My lecturer told us that we can produce few different EER models for this assignment and I would like to share with you my point of view at this problem and get as many other ideas …

Databases database-design
0
127
Member Avatar for JayGeePee

I have mySQL v.5.3 I think... I cannot figure out what is going on. Ive searched high and low and cant find an answer as to why i keep getting a syntax error. Heres the error I keep getting. [code] You have an error in your SQL syntax; check the …

Databases mysql
Member Avatar for smantscheff
0
197
Member Avatar for hunkychop

does anybody know a mysql query that i can use in my php document that will return the number of rows their are in a table? thanks, i cant find it in the MySQL mannual

Databases mysql
Member Avatar for amit_kuetcse2k5
0
188
Member Avatar for pavan_teja

I had a small issue. Can you pls check this... I have two tables TABLEA,TABLEB. TABLEA -------------- col1 col2 col3 TABLEB -------------- cl1 cl2 cl3 If col2 in TABLEA = cl2 in TABLEB, then i need to update cl3 in TABLE B with col3 in TABLE A. I tried running …

Databases oracle
Member Avatar for NeverLift
0
165
Member Avatar for sundarnatraj

Hi i need the Best and complete tutorial to learn DB from begining(from basic to end) .. can anyone suggest or provide materials for it..

Databases
Member Avatar for peter_budo
0
117
Member Avatar for jkon

Hello all, I have a table dir_records < SHOW CREATE TABLE dir_records > CREATE TABLE `dir_records` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `TITLE` varchar(250) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `URL_TITLE` varchar(250) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `TXT` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `COMPANY_ID` …

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

I have a query like: [code] select * from tableA where id in (1,2,3,..) [/code] List of ids ids very long about 200 000 ids. There is an clustered index on id colums. The same query on mysql rus fast but on MS it cant take about 20 minuts (on …

Databases mssql
Member Avatar for rch1231
0
128
Member Avatar for emillion82

There's a query where I want to get the: - Username of the user attached to the current opportunity record - Sales Stage associated with each opportunity record - Dollar amount associated with opportunity record I want to: - Take the current SELECT IF STATEMENT result, and collapse it based …

Databases mysql php sql
Member Avatar for smantscheff
0
145
Member Avatar for prasu

I have a table in which i need to sort the column names. NOT sort by column names.....sort the COLUMN NAMES. since it is easy to sort the records.....is there any way by which you can convert column into rows and rows into columns.

Databases mysql
Member Avatar for drjohn
0
1K
Member Avatar for AlistairH

First time visit here and looking forward to picking up a few pointers with regard to database integration within a web environment. I have one particular issue at the moment and being new to MySQL is causing me problems so I'll just jump straight in there if I may. I …

Databases mysql
Member Avatar for smantscheff
0
134
Member Avatar for ShArKsss

Okay, so I have 2 tables, mos_users & mos_tempban . mos_tempban contains 2 columns: ID & lastvisitdate (last one is not so relevant) mos_users contains 13 columns, only 2 importent: ID & block What I am trying to do is: I want to set Block = '1' in mos_users where …

Databases mysql
Member Avatar for ShArKsss
0
151
Member Avatar for chesnutsy

Hi, I know that when you set a column in ms sql to auto-generate IDs you won't be able to change the values. i'm having a problem with that restriction, because i have a table called Requisition, and for each entry, the requisition has a revision number. I've set the …

Databases mssql
Member Avatar for max_krauzer
0
114
Member Avatar for facarroll

I have two tables 'quiz' and 'topics'. The relevant columns in 'quiz' are 'passState' (which returns 1 or 0 representing true/false) and 'managerId' which is a record number referring to a particular administrator. The relevant columns in 'topics' are 'managerId' and six other columns named 'equip1' .... 'equip6' respectively, which …

Databases mysql pdf
Member Avatar for smantscheff
0
148
Member Avatar for MrBlack

Hi I installed visual studio 2008 64bit.and i need MS sql server express 2005/2008 64 bit. plzz help me.i tried one.but installation is not completed.Is there a special way to install it.

Databases mysql visual-studio
0
73
Member Avatar for Triztian

Hello all, I have a simple question, I have a website which has a database, and I have a customer(with another website) that takes the orders, but instead of saving the order to their database they must save it to ours, this meaning that the must be able to access …

Databases
Member Avatar for aquilax
0
145
Member Avatar for 4ukh

dears, Can i display/load Microsoft excel data in the internet browser that is stored on some shared folder? BR

Databases display microsoft
Member Avatar for iceandrews
0
117
Member Avatar for matthew1471

Hi, I have the following table. How can I select the lowest `place` for each `query` for each `date` (some queries appear twice as they have a different `fullurl`). Thanks for your help. Matt [code] +-------+---------------+--------------------------------+------------+ | place | query | fullurl | date | +-------+---------------+--------------------------------+------------+ | 2 | query …

Databases mysql
Member Avatar for smantscheff
0
136
Member Avatar for tapsilog09

hello.. i'm looking for tips in my database (using wamp server) in Room Scheduling System Basically the input is a Class Schedule.. ex. math1 8-9am monday eng1 9-10am monday computer1 8-9am tuesday up to 8+ subjects.. for the whole week (monday - saturday) after the input.. the system will automatically …

Databases
Member Avatar for tapsilog09
0
62
Member Avatar for Mylsamy

Hi all, I am using mySql query to insert a row into table. I have two tables as Table1 and ZTable1. Table1 has 3 fields TId,TName,TAge . ZTable1 has 4 fields ZTId,TId,TName,TAge. Table1 has 1 row. 1, Myl,24. Now i want to insert values to ZTAble1 as 1,(1,Myl,24) these values …

Databases mysql
Member Avatar for Mylsamy
0
85
Member Avatar for MisterPeters

Hi! I am a teacher who has been appointed "tech guy" for our school science fair. I'm trying to build a database to handle the information and number crunching for the event. I've been working with Access, but we have Filemaker too. I'm pretty tech savvy, for a teacher (or …

Databases database-design
Member Avatar for Ezzaral
0
119
Member Avatar for ftl25

Hi, Can anyone advise a good ER modelling tutorial/book or program? It is very time consuming to do ER diagrams in word. Also, has anyone else has come across the 'Pet Practice' database modelling problem? Thanks.

Databases
0
58
Member Avatar for muppet

I have a table that a new line gets added to when the machine stops with reason for stopping, when the machine gets going again I want to add the time lost. So when the machine stops the table will look like this: [CODE]ID | reason | time_lost 1 | …

Databases mysql
Member Avatar for Ezzaral
0
9K
Member Avatar for Triztian

Hello all hope this section isn't abandoned, anyway any help is really appreciated. Heres my problem: So I'm designing this database to hold orders, a customer places an order, which can have up to four accessories, at first I designed this table: [LIST] [*]idOrder[*]Acc1[*]acc2[*]acc3[*]acc4 [/LIST] but then I realized that …

Databases
Member Avatar for Triztian
0
136
Member Avatar for macobex

I'm in the middle of a project development, and I'm frustrated with this problem. Im running XAMPP under Ubuntu 10.04 (Lucid Lynx) mySQL version : Ver 14.14 Distribution 5.1.41 The problem is that, mySQL is accepting null values even if the field is declared with the NOT NULL constraint. Example: …

Databases mysql ubuntu
Member Avatar for macobex
0
265
Member Avatar for akvlko

Hey Friends! I have some tables by which i have to select the data to display in search result. Table Details user_type Table [CODE] int id string user_type [/CODE] ticket Table [CODE] int id 11 not_null primary_key auto_increment int user_id 11 not_null multiple_key int type_id 11 not_null multiple_key string ticket_type …

Databases mysql
Member Avatar for akvlko
0
118
Member Avatar for tcsikany

I have been working on a database in MS Accesss. I am trying to generate a query in the SQL view but the introduction to SQL class I am taking did not cover how to incorporate multiple WHERE conditions. Here is the query so far... SELECT intFID, COUNT(*) AS TotalAudits, …

Databases microsoft-access
Member Avatar for tcsikany
0
92
Member Avatar for facarroll

Can anyone see what is wrong here? This is my first serious attempt at this.[CODE]<?php $query1 = mysql_query(" SELECT topics.url_big, topics.url_small, topics.title, topics.".$egroup.", quiz.passState FROM topics INNER JOIN quiz ON (topics.managerId = quiz.".$managerId.") WHERE topics.".$egroup." = 1 ORDER BY title ASC"); ?>[/CODE]

Databases mysql
Member Avatar for facarroll
0
96
Member Avatar for dsmith01

I have a complex query I've been wrestling with for 2 days and can'seem to get it to run. I've tried LEFT JOINs and sub-querys and GROUP_CONCATs and still can't seem to get this to work right! What am I doing doing wrong? Lets say I have 2 tables in …

Databases mysql
Member Avatar for smantscheff
0
152
Member Avatar for feoperro

Hi, I can't manage to set a root password no matter what I try. I've tried to uninstall and reinstall. I've tried to get the new version and replace the old one with it. I've totally deleted all mysql files off my machine and reinstalled mysql but I STILL get …

Databases mysql
Member Avatar for feoperro
0
283
Member Avatar for roachae

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 = …

Databases mysql
Member Avatar for roachae
0
183
Member Avatar for changeco

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'); } …

Databases mysql
Member Avatar for changeco
0
120
Member Avatar for freestyler103

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.

Databases mysql
Member Avatar for smantscheff
0
254
Member Avatar for Squit

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

Databases mysql
Member Avatar for Squit
0
102
Member Avatar for jackparsana

Hi, please help me to know how to backup and Restore the Database. I am newer in backup topics. please help me. thanks jack

Databases asp.net mssql mysql
Member Avatar for smantscheff
0
112
Member Avatar for plugsharma

Hi, I need to pass a parameter into a stored procedure which values are dynamic always. Executing a variable which having the Select statement. Following query working fine. BEGIN DECLARE @strQuery NVARCHAR(MAX) DECLARE @CountryId INT DECLARE @CityId INT SET @CountryId = 2 SET @CityId = ' AND CityId IN (23,45,85,86)' …

Databases mssql
Member Avatar for glennt
0
223
Member Avatar for SolidSolutions

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 …

Databases mysql
Member Avatar for smantscheff
0
153
Member Avatar for think_new

hi, I am a SQL Guy, I like reading SQL Server books, Please suggest me some books which teaches advanced topics in SQL Server not just teaching the known things.

Databases client-server mssql sql
Member Avatar for gbraden
0
168
Member Avatar for John Linux

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 …

Databases mysql
Member Avatar for d5e5
0
167
Member Avatar for Some-Jackass

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 …

Databases apple mysql
Member Avatar for Some-Jackass
0
161
Member Avatar for derozza

1.[CODE]SELECT pos_cashreceiptdetail.LocationCode,pos_cashreceiptpayment.TerminalCode,pos_cashreceiptpayment.ReceiptDate, pos_cashreceiptdetail.Description,pos_cashreceiptpayment.ReceiptNo,SUM(TotalCost) FROM pos_cashreceiptdetail,pos_cashreceiptpayment WHERE pos_cashreceiptdetail.Description LIKE 'Raw%' AND pos_cashreceiptdetail.LocationCode = pos_cashreceiptpayment.LocationCode AND pos_cashreceiptdetail.ReceiptDate = pos_cashreceiptpayment.ReceiptDate AND pos_cashreceiptdetail.ReceiptDate BETWEEN '2010-10-06' AND '2010-10-20' GROUP BY pos_cashreceiptpayment.ReceiptDate,pos_cashreceiptdetail.ReceiptNo[/CODE] 2.[CODE]SELECT pos_cashreceiptdetail.LocationCode,pos_cashreceiptpayment.TerminalCode,pos_cashreceiptpayment.ReceiptDate, pos_cashreceiptdetail.ShortDescription,pos_cashreceiptpayment.ReceiptNo,SUM(Totalprice) FROM pos_cashreceiptdetail,pos_cashreceiptpayment WHERE pos_cashreceiptdetail.ShortDescription LIKE 'Food Stall%' AND pos_cashreceiptdetail.ReceiptDate = pos_cashreceiptpayment.ReceiptDate AND pos_cashreceiptdetail.ReceiptNo = pos_cashreceiptpayment.ReceiptNo AND pos_cashreceiptdetail.ReceiptDate BETWEEN '2010-10-06' AND '2010-10-20' …

Databases mssql
Member Avatar for rch1231
0
128
Member Avatar for jozz3

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, …

Databases mysql
Member Avatar for jozz3
0
129

The End.