Jump to content

Search the Community

Showing results for tags 'sql'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 191 results

  1. I currently am doing a little work on a seasonal website for our golf league and wanted to improve the content with some databases. Going online and reading some articles regarding doing this I came across the issue of whether to write my code using SQL object oriented, SQL procedural or I guess what is the latest and greatest scripting, PDO. What I have read is that if I have any thought of changing over to another database type other than SQL, PDO would be the way to go. But my thought is that I most likely would not because I not only may never deal with other types of databases but I do not think that all these Hosting sites which SQL is most likely ingrained in would change and make their thousands of customers recode all their scripts. “Am I wrong” When I was taught PHP/SQL, I believe it was using the Procedural method, which appears not to be far from the object oriented script. PDO seems to be a little more involved in learning its syntax. What would your recommendations be for me? I would learn the PDO method if you think it would be beneficial. But if not necessary, I will stick to what I already feel comfortable with. All comments greatly appreciated. P
  2. I love the work going on at w3Schools - awesome stuff! For the SQL Tutorial, might I suggest a accessible logical model for the tables? For instance, in the "Try it" demo pages, there is a right-hand-side pane with all the available tables, but there is no way to just view the columns of those tables without leaving behind the current sql worksheet. It would be tremendously helpful if users/students could view, via some kind of client-side magic (javascript?), the model of the tables. Ideally, this would include the metadata like primary key and constraint information, but just starting with the name of the columns would be sweet. Thanks for your time and attention.
  3. Hey all!A bunch of us have been putting together a web-based drawing app. In a nutshell, users connect in real-time to draw or chat on a sort of interactive whiteboard. Plenty of these are made in Flash, but we are determined to build it in JavaScript and HTML5; a site that immediately works on mobile (because it's not Flash), tailors to everybody from drawing tablet users to people who want to screw around, chat and play games — and with an awesome, modern look that other apps lack. The thing that works so well is these kinds of programs give you a lot of freedom of expression that I think by making more accessible we can popularize, and truly get a future-proof, lasting community going.Current drawing apps aren't too popular as they're not accessible to the host of many devices people use, chatting's not versatile or user-friendly enough to compete with chat sites, and their designs look god-awful like it's still the 90's. So with what we're after, there's insane potential in this project. This is the interface. I hope it gives you some sense of what we're aspiring for. It's predominantly HTML, CSS, and JS with server-client communication in HTML5's WebSockets, and some points in PHP. If you're good with any of these, message me here, Skype drawplanet or email form@drawplanet.net. I'll be more than happy to answer any questions. And if you're critical of anything, nothing's set in stone. It's very much a by the community, for the community type of project. Also on the hunt for people good with P2P networking, node.js, SQL, or server management.
  4. Hello everyone, I did try to search alot for an answer on this one, but I could not find it anywhere. I'm trying to have a simple search feature for my site, but I keep getting a blank page when doing a search containing multiplie words "like this" Tried to work it out with a str_replace but did not do the trick, have done this before, and it does work when just outputing the val as an echo instead of a query, so I'm blank now and appreciate any help! //function for replacing empty space with % function moreWords($val){$val = str_replace(" ","%", $val);return $val;} //Query$getCategoriesResults = mysql_query("SELECT * FROM `database`.`forumCategories` WHERE description LIKE '%".moreWords($_GET['search'])."%'");
  5. I want to develop a library system in which fine will be calculated as follows- the code should be in php and sql database. I want to retrieve date from database and subtract it from current date. The difference will be then multiplied with 5 to know the fine. How can I do this? How can i retrieve date from database and subtract it from current date? returndate is column name from where i want to retrieve date for id=1 and issret is the table name. <form id="form1" name="form1" method="post" action=""><label for="txtDueDate"></label><input type="text" name="DueDate" id="txtDueDate" /><input type="submit" name="submit" id="submit" value="Submit" /></form><?phpif(isset($_POST['submit'])){$result=mysql_query("select returndate from issret where id=1"); if(mysql_num_rows($result)>0){$x=date("Y/m/d");$diff=date_diff($result,$x);echo $diff->format("%R%a days");}}?>
  6. Hello, i am trying to retrieve data from five different tables and union the tables into one. I was wondering if there is anything I can do in my coding to make it more efficient as it is taking considerable time to run. The code is: SELECT 'Order' As Order_Trade ,[sourceSystemId] ,[ReceivedData] As Order_Trade_Date ,[ReceivedTime] As Order_Trade_Time ,[LastExecutor] As Trader ,[ExecutingBookId] As Book ,[OrderId] As Order_Trade_ID ,[buySell] ,[CounterpartyCode] ,[ExchangeId] ,[Version] As VersionNumber ,[instrumentCode] ,[TotalQuantity] As Order_Trade_Quantity ,[OrderNotes] As Order_Trade_Notes ,[OrderDesk] As Desk FROM [CoreRDSPrd].[core].[tblRdsTsHostedOrderProgress] WHERE [LatestVersion] = 'Y' AND [sourceSystemId] = '62' OR [sourceSystemId] ='65' AND [ReceivedData] > DATEADD(d, -2, current_timestamp) ---------------------------------- UNION SELECT 'Order' As Order_Trade ,[sourceSystemId] ,LEFT([Timestamp], 8) As Order_Trade_Date ,SUBSTRING([Timestamp], 9,9) As Order_Trade_Time ,[ClEnteredBy] As Trader ,[ClBookId] As Book ,[ClOrderId] As Order_Trade_ID ,[ClBuySell] As BuySell ,[ClCounterpartyCode] As CounterpartyCode ,[ExchangeId] ,[ClVersion] As VersionNumber ,[instrumentCode] ,[ClQuantity] As Order_Trade_Quantity ,[ClOrderNotes] As Order_Trade_Notes ,[OrderDesk] As Desk FROM [CoreRDSPrd].[core].[tblRdsTsOrder] WHERE [LatestVersion] = 'Y' AND[sourceSystemId] = '62' OR [sourceSystemId] ='65' AND LEFT([Timestamp], 8) > DATEADD(d, -2, current_timestamp) ---------------------------------- UNION SELECT 'Trade' As Order_Trade ,t.[sourceSystemId] ,ts.[ClTradeDate] As Order_Trade_Date ,ts.[ClTradeTime] As Order_Trade_Time --,LEFT([Timestamp1],8) As Order_Trade_Date --,SUBSTRING([Timestamp1], 9,9) As Order_Trade_Time ,t.[updateUser] As Trader ,t.[ClBookId] As Book ,t.[ClTradeId] As Order_Trade_ID ,t.[ClBuySell] As BuySell ,t.[ClCounterpartyCode] As CounterpartyCode ,t.[ExchangeId] ,t.[ClVersion] As VersionNumber ,t.[instrumentCode] ,t.[ClQuantity] As Order_Trade_Quantity ,t.[ClBusinessTransaction] As Order_Trade_Notes ,'111111' As Desk FROM [CoreRDSPrd].[core].[tblRdsTsTrade] t, [CoreRDSPrd].[core].[tblRdsTsTradeSet] ts WHERE ts.[LatestVersion] = 'Y' AND t.[sourceSystemId] = '62' OR t.[sourceSystemId] ='65' AND ts.ClTradeSetId=t.ClTradeSetId AND LEFT(t.[Timestamp1], 8) > DATEADD(d, -2, current_timestamp) ---------------------------------- UNION SELECT 'Trade' As Order_Trade ,[sourceSystemId] ,[TradeDate] As Order_Trade_Date ,[Tradetime] As Order_Trade_Time ,[Trader] ,[bookId] As Book ,[TradeId] As Order_Trade_ID ,[buySell] ,[Counterparty] As CounterpartyCode ,[ExchangeId] ,[VersionNumber] ,[RICCode] As InstrumentCode ,[Quantity] As Order_Trade_Quantity ,[businessTransaction] As Order_Trade_Notes ,[CustomSource] As Desk FROM [CoreRDSPrd].[core].[tblRdsTsEtpMarketTrade] WHERE [LatestVersion] = 'Y' AND [TradeDate] > DATEADD(d, -2, current_timestamp) AND [sourceSystemId] = '62' OR [sourceSystemId] ='65' is there anything that can be done to make this query quicker, or is the lag as a result of the many rows which i expect it to return? Thanks, Lorijent Lamce
  7. Hi i have a table called hospitails. the table structure is as below Hospitals:- Hospital_id Bigint name varchar(45) city_id bigint district_id bigint state_id bigint now i need to search hospitals based on name,city_id,district_id,state_id. the query must cntain all the 4 fields. when user does not provide any of the value all the hospitals with all the names from all the cites,districts,states has to be listed. when user provides partial name and ignores the rest of the three fileds, it has to provide all the hospitals that starts with that name from all cities,districts,states, when user ignores the other 3 fields and provides the city_id then all the hospitals should be listed from that city Like wise. for varchar columns if we apply 'like' then it does this kind of things but how to do this when there are bigint columns? I need this query. please help.
  8. I am not sure if this is the right place to ask this question so forgive me if it is not. I am having some challenges encrypting/decrypting and even using passwords in plaintext. I noticed that "the use of passwords" was not included in the PHP/mySQL tutorial examples (I am still wondering why since most websites require passwords). Please can someone direct me to a section where the use of passwords was explained? The way w3schools.com explains basics makes it very easy for me to understand and get a firm foundation that is why I will love if it was explained in this website. Thank you.
  9. I am wondering why this is not working. I have a table of order line items. each order can have multiple line items with the same transaction ID just different item codes. I am trying to find single transaction ID's with a specific item code. I also tried doing a count (transactionnumber)<2 but could not figure out how to add a where for the item number. So an order for just this item select distinct(transactionnumber) from Orders (I thought this would select any unique transaction number IE only one occurance)where Code='9987' When I run the above and check the transaction numbers it is any transaction with that code not transactions with only that code? I also tried this select * from OrdersWhere (select COUNT(transactionnumber)from Device_Orders) <2 and ItemCode='9987' This returns no records when I know there are single transaction numbers with that item code? Any suggestions would be appreciated
  10. Hi, I've just built a basic web site, but I now realise (by going through the process) that I need to understand other languages & processes in order to make the site streamlined & fully functional. Because I've only learnt html & css (on a basic level) my understanding of php, sql, js, xml, etc is very poor. I therefor need some advice on what the best mechanisms are for inputting data, storing it & displaying it on the web, possibly with some type of rss feed too. The basic process the site is doing, can be described as follows: 1. Users enter data using an online form. 2. Data is stored on a database & manually verified. 3. Certain info from the database is automatically displayed on the site (but not all) in a friendly viewable format. 4. Every time the site is updated a feed is created (like an rss or blog). The first two processes I have achieved, but I am exploring ways of achieving the 3rd & 4th processes. Any advice on what methods or languages would be best to use would be greatly appreciated. I'm happy to learn any coding required. The data set can be stored in various formats (xlsx, csv, ods, tsv, etc), its really a question of the best way to interpret it & automatically display it that I am exploring. Along with creating the feed. Thanks for any advice. Old Guy.
  11. I need your expertise on this problem I have. I have a Vehicle/Driver Inspection Database and I'm trying to create a Traffic Violation Point System, its a system when drivers commit certain traffic offences they will incur driving-offence points.System: The points for violations that all occurred within the last 12 months of ONE ANOTHER are added together to calculate point total. If the accumulated points is reached 14 points driver is suspended the points will be REMOVED or minus 14 points after the suspension has been served.Example:Date of Offence - Number of Points [*]Aug. 6, 2013 - 6[*]Sept. 14, 2013 - 4[*]Feb. 4, 2014 - 4[*]Apr. 25, 2014 - 4[*]Apr. 25, 2014 - 2[*]May 8, 2014 - 2 Explanation:On April 25, 2014 two offences incurred and from (Aug 6, 2013 - Apr. 25 2014) 14 points have accumulated (6 + 4 + 4) and suspension is carried out then 14 points is removed. The 2nd offence on Apr. 25, 2014 will be carried forward and added to May 8, 2014 points (total 4 points).Below are DB Tables:tbl_Driver [*]DriverID[*]Driver License[*]FirstName[*]LastName tbl_Event [*]EventID[*]EventTime[*]DriverID[*]CarID tbl_EventViolation [*]EventViolatinID[*]EventID[*]ViolationID[*]Status (1 = no, 2 = yes radio buttons) tbl_Violation [*]ViolationID[*]ViolationName[*]Points tbl_ViolationClass [*]ViolationClassID[*]ClassName I made an SQL Code but to sum the accumulated points only but not the whole condition. See below: SELECT a.DriverId, a.DriverLicense, a.FirstName + ' ' + a.LastName as DriverName, a.FirstName, a.LastName, a.DriverMobileNo1, a.Notes, SUM(a.Points) as TotalPoints FROM ( SELECT dbo.Event.EventTime, dbo.Drivers.DriverID, dbo.Drivers.DriverLicense, dbo.Drivers.FirstName, dbo.Drivers.LastName, dbo.Drivers.DriverMobileNo1, dbo.Violation.ViolationName, dbo.Violation.Points, dbo.Drivers.Notes FROM dbo.Drivers INNER JOIN dbo.Event ON dbo.Drivers.DriverId = dbo.Event.DriverId INNER JOIN dbo.EventViolation ON dbo.Event.EventId = dbo.EventViolation.EventId INNER JOIN dbo.Violation ON dbo.EventViolation.ViolationId = dbo.Violation.ViolationId INNER JOIN dbo.ViolationClass ON dbo.Violation.ViolationClassId = dbo.ViolationClass.ViolationClassID WHERE dbo.EventViolation.Status = 2 AND dbo.ViolationClass.ClassName Like 'C' AND dbo.Violation.ViolationName Not Like 'LOAD NOT CORRECTLY RESTRAINED' AND dbo.Violation.ViolationName Not Like 'DRIVING WITHOUT UAE LICENSE' ) as a GROUP BY a.DriverId, a.DriverLicense, a.FirstName, a.LastName, a.DriverMobileNo1, a.NotesORDER BY Points desc Please anyone try to modify the code to work on the conditions set above to have a column with Total Points (with conditions above)Thank you for your time. Looking forward for the solution.
  12. Hi all PHP newbie and first post! I hope someone can help. I have looked at some of the tutorials but still can't get my head around how to get the data from within a PHP script. Trying to create a form with two fields "Date" and "Channel" to look at the 'calldate' and 'channel' columns and then give a count result, so just want to find whatever specified on the form and give the number of ocurrences found grouped by date. Ie, how many ocurrences for specified 'chanel' %CLI/1234567% for a given date. Thanks
  13. I have recently started a new position in my company as a Junior Database Developer. I have previously worked in Data Analysts roles; mainly using advanced Excel & VB. I have a strong passion for SQL, as I now aim to develop my career down the Database Developer route. In my first month, I have began to get to grips with using SQL syntax; building and creating tables etc. Whilst I appreciate it takes time to understand how processes work, I am eager to further understand what things mean; how things work & why. After reading up on numerous forums, not everything is explained easily for beginners. I much prefer seeing working examples of things, using analogies. I am reaching out to SQL gurus to help explain a few items for me. Unfortunately, I am unable to attach the Word document with my requirements. If anybody can be of any support, and therefore get in touch, I will be very grateful! Regards, Ben
  14. hello friends I have a table with three columns col1,col2 and col3. how do I add rows based on column1? col1|col2|col3| A | 2 | 4 | B | 6 | 8 | A | 10 |12| C | 14 |16| C | 3 | 2 | Output col1 col2 col3 ----|-------|-------| A | 12 | 16| B | 6 | 8| C | 17 |18| I am running the query in ms access from vb.net, can someone tell me why it does not work select col1, SUM(col2) as col2, SUM(col3) as col3 from table1 group by col1 Thanks
  15. hello friends I have two tables with column A and column B. I want to update column B of table9 with column B of table1 . I am trying this query in ms access from Vb.net. It pastes the column below the existing data. How do I write a update query that will replace the existing column? update table1 t1 LEFT JOIN table9 T9 on t1.a = t9.a SET t9.b = t1.b Thanks
  16. TotalWhat

    SQL Question

    This question has been solved. The solution is at the bottom. Hi! So here's the question for you. I use Microsoft SQL Server Management Studio. I have a table 'Frogs', that has two attributes. FrogName and FrogHabitat. If I do a select * from the table the output is something like this: FrogName FrogHabitat Wood frog Iceland Wood frog Denmark Wood frog Sweden Sky frog Iceland Sky frog Germany Hill frog France Hill frog Sweden The question is: "Write the query that would produce the FrogName of pairs of Frogs whom both share the same FrogHabitat". And the final output should look like this: FrogName FrogName Sky frog Wood frog Wood frog Sky frog Hill frog Wood frog Wood frog Hill frog I have thought about this allot but I can't figure out what the right query would be. Any help along the way to enligthment would be much appreciated! Thank you!
  17. Does Anybody have a SQL code that does the following ones of or is it done in parts?1. DB Schema Design - Design a basic database to store the following information + A fleet of Vehicles - Include details such as mileage, vin numbers etc + A pool of drivers - Include relevant documentation, e.g. Drivesr license, ID Book + A group of routes - Marking out GPS coords for directions etc. is not necessary, just include a start & end address as well as any other info you believe to be pertinent + A drivers schedule, tying the above 3 tables together
  18. my focus is across a whole 3 years (156 weeks) of data, beginning January 1st 2011 (or nearest date) and ending December 31st 2013 (or nearest date) – so while we are looking at 3 years total, we will only end up with 52 weeks in our clean version of the data, labelled Week 1 to Week 52 (and not dates).there will be items in this list that launched before 1st Jan 2011, for which part of the launch year will show up in the period we’re focused on. In order that data percentiles (will be calculated at later stage) are not clouded by this, we also need to move any part year data from launches preceding 1st Jan 2011 to the relevant column. To illustrate by example, an item launched in July 2010 will have 26 weeks in 2010 (that fall outside of our 3 yr window) and 26 weeks that fall inside our 3yr window, but the first week we see is actually week 27 of that item’s launch, and not week 1. So the 26 weeks of data that fall into our window, should be shifted out to align with week 27-52 of the ‘clean’ data columns – does this make sense? So i want to have another column next to the WeekNumber column, which will give me the correct number (from 1 to 52) to place the sales value for each product. If then you do a pivot as shown in http://i.imgur.com/VZVIlPb.jpg by arranging the weeknumber column in the Pivots Column area and Sales Value in Pivots Value area, you will see the sales values are then shifted properly to fit the 52 columns. So for each Product, 1] if the sales data starts from 1st week (W 2011 01) and its total weeks count is < 52, then it means some weeks sales data lying in previous year. So this data needs to be numbered to correct week (between 1 to 52), by finding its column: (52 - count of weeks containing data for that product + 1).2] if the sales data does not start from 1st week (W 2011 01) and its total week count is < 52 then move it to 1st week (W 2011 01) column in 1 to 52 weeks i.e. number it as 1, 2, .....<=52.3] if the data starts from 1st week and is 52 weeks data then keep it as it is showing from 1 to 52 weeks. i.e. number it as 1,2,....52. Hope this makes sense. see the linkback for further clarity. http://stackoverflow.com/questions/23825905/shifting-156-weeks-sales-figures-to-52-weeks
  19. I am trying to process a string which contains various data relating to an elearning record; Moodle SCORM suspend_data if you're familiar with it Since I do not have access to server side SQL/CLR functions through the Moodle interface, I am attempting to reference, and extract, the relevant information from the string by explicitly referencing the character locations of the information I need in the string and then converting them as required so they can be summed e.g. SELECT prefix_user.username,........ ((CASE(SUBSTRING(value_rep,237,1)) WHEN 'c' THEN 1 ELSE 0 END) + ........(CASE(SUBSTRING(value_rep,3659,1)) WHEN 'c' THEN 1 ELSE 0 END)) AS "# Videos watched"........FROM ((prefix_user LEFT JOIN (SELECT prefix_scorm_scoes_track.userid, Replace(value,"''","'XX'") AS value_repFROM prefix_scorm_scoes_track WHERE (((prefix_scorm_scoes_track.element)='cmi.suspend_data'))) AS vid ON prefix_user.id = vid.userid The string contains multiple occurrences of the string patterns '','n' and 'nn' where n is any digit 0-9 which I need to replace with the same string pattern e.g. 'XX', so that the total length of the string as a whole remains the same. I Initially thought that the pattern would always exist as '' or 'nn' so it was relatively simple to use a REPLACE(value,"''","XX") I understand it's not possible to use regex in the REPLACE function and have been investigating the use of PATINDEX with STUFF, but understand this is inly suitable for operating on 1 occurrence of a pattern. The report can be output to a CSV for viewing in Excel, so my conclusion is currently to carry out post-processing with Excel VBA where I will have access to loops and other functions. Is what I am trying to achieve possible without the use of a function on the SQL server?
  20. From the tables that I attached, a. Assume Job relation is created. Write the SQL statement that will create the EMP relation (use the structure shown in Table 2) Following is my answer: Create Table EMP (empnum NUMBER(3), lname VARCHAR2(15) CONSTRAINT emp_lname_nn Not Null, fname VARCHAR2(25), mi CHAR(1), hiredate DATE CONSTRAINT emp_hiredate_nn Not Null, enddate DATE, Jobcode CHAR(3), Salary Number(10,2) CONSTRAINT emp_empnum_pk Primary Key (empnum), CONSTRAINT emp_jobcode_fk Foreign Key (jobcode) REFERENCES Job(job_code); b. Write the SQL statement that will enter the first data row into the EMP relation My answer: Insert into EMP values (101, 'O''Connel', 'John', 'mi', '11-Aug-2000', NULL, '502', 3600) For both of this questions, can someone checks with me whether am I doing it correctly? Please point out my mistakes if any, I appreciate your guides.Thank you!
  21. Hello there, some help in this? Is it possible to calculate numeric data in table with data coming from forms? I mean something like this: mysql_query("UPDATE ov SET dt_ob=(dt_ob+'$suma1') WHERE smetka='$debit' ",$con) dt_ob and smetka are coloumns in the table, $suma1 and $debit are data coming from form. The code above do not work to me.
  22. Hello Ladies and Gents, I am new to sql and this forum so please forgive if I don't word my question very well. I'm having diffuculty retrieving data when trying to run more than 2 queries in w3schools course. I was trying to pull from customers, Orders, Products and OrderDetails as a training example to myself. What i'm asking is, if someone is willing, can they please write out a granular query that I can follow. I get different errors when trying to tweek my query. I want to be able to pull 3 or more tables at a time but know I'm missing a fundimental step or steps during my process. SELECT Orders.OrderID, Customers.CustomerName, Orders.EmployeeID, Products.ProductNameFROM OrdersINNER JOIN CustomersON Orders.CustomerID=Customers.CustomerID AND Orders.EmployeeID; I know I'm not doing my joins right for sure. I want to be able to pull a customers product, get the employee ID that took the order and the product that was associated with the order and go a bit further. Getting a few examples and explanations would really help me. I'm just not getting it and google isn't giving the answer I need as there are several sql applications that give different nuances of retrieving query information from tables. Thank you community for taking the time to help me out. I just want to get to a point where I can answer a question instead of asking the question. Or maybe someone can point me to a great site that shows different and more detailed examples of running queries such as above. Thank you, -Edgar
  23. I'm trying to organize this SQL query from a packet capture and I'm more of a network/application guy, not so much of a DBA. Can anyone if I got this right and if this makes sense? I think the SQL query is this: SELECT [t0].[SECTIONNAME], [t0].[PARAMETERNAME], [t0].[INTVALUE], [t0].[STRINGVALUE], [t0].[DATEVALUE], [t0].[INFRASTRUCTURAL], [t0].[SiteParametersId] FROM [dbo].[SITE_PARAMETERS] AS [t0] WHERE ([t0.[SECTIONNAME] = @p0) AND ([t0].[PARAMETERNAME] = @p1) After that, is it defining the parameters used in the query like this? @UserId = @p1, @IsRoot = @p2 Here's the whole thing: S E L E C T [ t 0 ] . [ S E C T I O N N A M E ] , [ t 0 ] . [ P A R A M E T E R N A M E ] , [ t 0 ] . [ I N T V A L U E ] , [ t 0 ] . [ S T R I N G V A L U E ] , [ t 0 ] . [ D A T E V A L U E ] , [ t 0 ] . [ I N F R A S T R U C T U R A L ] , [ t 0 ] . [ S i t e P a r a m e t e r s I d ] F R O M [ d b o ] . [ S I T E _ P A R A M E T E R S ] A S [ t 0 ] W H E R E ( [ t 0 ] . [ S E C T I O N N A M E ] = @ p 0 ) A N D ( [ t 0 ] . [ P A R A M E T E R N A M E ] = @ p 1 ) @ 4@ @ p 0 n v a r c h a r ( 3 ) , @ p 1 n v a r c h a r ( 1 0 ) @ p 0 4 W e b @ p 1 4 M a x Q u e r i e s [ < d 4 S E C T I O N N A M E d 4 P A R A M E T E R N A M E & I N T V A L U E 4 S T R I N G V A L U E o D A T E V A L U E 2 I N F R A S T R U C T U R A L S i t e P a r a m e t e r s I d W e b M a x Q u e r i e s 0 y @ 4 E X E C @ R E T U R N _ V A L U E = [ d b o ] . [ p _ S a l e s O r d e r s _ S e a r c h ] @ M a x R e s u l t s = @ p 0 , @ U s e r I d = @ p 1 , @ I s R o o t = @ p 2 , @ L i s t C u s t o m e r = @ p 3 , @ P r o j e c t N u m b e r = @ p 4 , @ L a s t M o d i f i e d B y N a m e = @ p 5 , @ C o n t r a c t M a n a g e r M a i l I D = @ p 6 , @ P r o j e c t M a n a g e r M a i l I D = @ p 7 , @ K A M M a i l I D = @ p 8 , @ R e s p o n s i b l e S a l e s A d m i n M a i l I D = @ p 9 , @ O r d e r M a n a g e r M a i l I D = @ p 1 0 , @ S h i p m e n t R e s p M a i l I D = @ p 1 1 , @ C a r a t C o d e = @ p 1 2 , @ I s A r c h i v e d = @ p 1 3 , @ L i s t S o u r c e A p p l i = @ p 1 4 , @ L i s t P r o c e s s S t a t u s = @ p 1 5 , @ L i s t E d i t i o n S t a t u s = @ p 1 6 , @ L i s t B u s i n e s s U n i t = @ p 1 7 , @ L i s t L e g a l U n i t = @ p 1 8 , @ L i s t C u s t o m e r C o u n t r y = @ p 1 9 , @ A l l i a n c e C r e a t i o n F r o m = @ p 2 0 , @ A l l i a n c e C r e a t i o n T o = @ p 2 1 , @ E R P S e n t F r o m = @ p 2 2 , @ E R P S e n t T o = @ p 2 3 , @ C u s t o m e r P O R e c e i p t D a t e F r o m = @ p 2 4 , @ C u s t o m e r P O R e c e i p t D a t e T o = @ p 2 5 , @ L a s t M o d i f i c a t i o n D a t e F r o m = @ p 2 6 , @ L a s t M o d i f i c a t i o n D a t e T o = @ p 2 7 , @ I s I n v o i c e d = @ p 2 8 , @ I s C a n c e l l e d = @ p 2 9 , @ C u s t o m e r P O I D = @ p 3 0 , @ A l l i a n c e O r d e r I d = @ p 3 1 , @ E r p S a l e s O r d e r I d = @ p 3 2 , @ C u s t o m e r C a t a l o g N u m b e r = @ p 3 3 , @ C a t a l o g N u m b e r = @ p 3 4 , @ E R P R e f e r e n c e N u m b e r = @ p 3 5 , @ L i s t C a t e g o r y = @ p 3 6 , @ O p p o r t u n i t y R e f e r e n c e = @ p 3 7 , @ C u s t o m e r P r o g r a m C o d e = @ p 3 8 , @ A g g r e g a t i o n R e f e r e n c e I d = @ p 3 9 , @ B a c k O f f i c e O A M a i l I d = @ p 4 0 , @ A n t i c i p a t i o n O r d e r I d = @ p 4 1 , @ C r e a t i o n D a t e O f L a s t E d i t i o n F r o m = @ p 4 2 , @ C r e a t i o n D a t e O f L a s t E d i t i o n T o = @ p 4 3 , @ O f f e r R e f e r e n c e = @ p 4 4 , @ A l l i a n c e F A C D R I d = @ p 4 5 , @ L i s t B i l l i n g P l a n C o n d i t i o n s S t a t u s e s = @ p 4 6 , @ O r d e r D e s c r i p t i o n = @ p 4 7 , @ N o t V i s i b l e F o r C D R = @ p 4 8 , @ L i s t A t t a c h m e n t T y p e s = @ p 4 9 4 @ p 0 i n t , @ p 1 i n t , @ p 2 b i t , @ p 3 n v a r c h a r ( 4 0 0 0 ) , @ p 4 n v a r c h a r ( 4 0 0 0 ) , @ p 5 n v a r c h a r ( 4 0 0 0 ) , @ p 6 n v a r c h a r ( 4 0 0 0 ) , @ p 7 n v a r c h a r ( 4 0 0 0 ) , @ p 8 n v a r c h a r ( 4 0 0 0 ) , @ p 9 n v a r c h a r ( 4 0 0 0 ) , @ p 1 0 n v a r c h a r ( 4 0 0 0 ) , @ p 1 1 n v a r c h a r ( 4 0 0 0 ) , @ p 1 2 n v a r c h a r ( 4 0 0 0 ) , @ p 1 3 b i t , @ p 1 4 n v a r c h a r ( 7 ) , @ p 1 5 n v a r c h a r ( 5 ) , @ p 1 6 n v a r c h a r ( 9 5 ) , @ p 1 7 n v a r c h a r ( 6 6 6 ) , @ p 1 8 n v a r c h a r ( 7 6 3 ) , @ p 1 9 n v a r c h a r ( 8 7 2 ) , @ p 2 0 d a t e t i m e , @ p 2 1 d a t e t i m e , @ p 2 2 d a t e t i m e , @ p 2 3 d a t e t i m e , @ p 2 4 d a t e t i m e , @ p 2 5 d a t e t i m e , @ p 2 6 d a t e t i m e , @ p 2 7 d a t e t i m e , @ p 2 8 b i t , @ p 2 9 b i t , @ p 3 0 n v a r c h a r ( 4 0 0 0 ) , @ p 3 1 n v a r c h a r ( 4 0 0 0 ) , @ p 3 2 n v a r c h a r ( 4 0 0 0 ) , @ p 3 3 n v a r c h a r ( 4 0 0 0 ) , @ p 3 4 n v a r c h a r ( 4 0 0 0 ) , @ p 3 5 n v a r c h a r ( 4 0 0 0 ) , @ p 3 6 n v a r c h a r ( 1 7 ) , @ p 3 7 n v a r c h a r ( 4 0 0 0 ) , @ p 3 8 n v a r c h a r ( 4 0 0 0 ) , @ p 3 9 n v a r c h a r ( 4 0 0 0 ) , @ p 4 0 n v a r c h a r ( 4 0 0 0 ) , @ p 4 1 n v a r c h a r ( 4 0 0 0 ) , @ p 4 2 d a t e t i m e , @ p 4 3 d a t e t i m e , @ p 4 4 n v a r c h a r ( 4 0 0 0 ) , @ p 4 5 n v a r c h a r ( 4 0 0 0 ) , @ p 4 6 n v a r c h a r ( 1 5 ) , @ p 4 7 n v a r c h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@ p 2 5 o @ p 2 6 o @ p 2 7 o @ p 2 8 h @ p 2 9 h @ p 3 0 4 @ p 3 1 4 @ p 3 2 4 @ p 3 3 4 @ p 3 4 4 @ p 3 5 4 @ p 3 6 " 4" 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 @ p 3 7 4 @ p 3 8 4 @ p 3 9 4 @ p 4 0 4 @ p 4 1 4 @ p 4 2 o @ p 4 3 o @ p 4 4 4 @ p 4 5 4 @ p 4 6 4 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 @ p 4 7 4 @ p 4 8 h @ p 4 9 0 40 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 1 8 , 2 1 , 2 6 @ R E T U R N _ V A L U E &
  24. Am designing a simple php forum platform using PHP and MYSQL to insert the data into myql database. But i use to get this kind of --[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 'WHERE id='4'' at line 1] PLEAS WHAT SHOULD I DO
  25. birbal

    opinion about ORM

    Do you use ORM in your production or commercial application? I think ORMs are good for maintaining OO relation with datbase, But it has its limitation. For DML ORM is great for faster development and minimize duplication of code. But for DQL I think it is hard to do complex SQLs with ORM. Raw SQL would go along well. I have read somewhere it is not good to fit something like RDBMS to OO which it is not. Anyway i dont know how many open source and commercial application uses it. It looks like OSCommerce prefer to not use ORM. I have own written active record like ORM which uses Reflection to map the classess. It works well with DML and DQL (one to one,one to many relations). But have some issues with many to many relations (It could be resolved though i think). Though it serving well , I am not much happy with it as i expected. I can even see if i use Raw SQL i could even mnimize (for DQL) one or two query than that ORM. Though that helps to reduce writing code manually a lot. Conclussion, I have decided to use it in DML part. and change the DQL part to be raw SQL specially in many to many relations table and complex queries. From this disappointment i look into other ORM like doctrine or propel. But they have learning curve and fairly complex. They I think do lot of things than i need. Currently I am not in position to invest time to read and grasp whole doctrine/propel and at the end , find the same conclussion as above. I know benfits and drawbacks of ORM, still hearing any experience regarding this would helpful. Another query does Doctrine supports temporary tables or not ? Even I tried to install doctrine. But composer showing some error. Before i resolved it and invest time. i would like to hear your story with ORM.
×
×
  • Create New...