Reputation: 745 Enlightened
- Active Posts:
- 1,521 (0.97 per day)
- 30-January 09
- Profile Views:
- Last Active:
- 24 minutes ago
- Viewing Topic: if 1=1? WHY?
- OS Preference:
- Favorite Browser:
- Favorite Processor:
- Favorite Gaming Platform:
- Your Car:
- Dream Kudos:
- Expert In:
Posts I've Made
Posted 17 May 2013What's that remote query? Are you connecting to a remote server? If so, you can expect the execution time to blow out in a big way, especially if the remote server is having to pipe a large amount of data across the connection. Are you able to provide the SQL query to see if it can be optimised?
Posted 15 May 2013That diagram looks good, and meets 3NF.
Posted 14 May 2013You can still have a table called user, you just need to delimit it, like this:
CREATE TABLE [User]
Note that reserved keywords that are used as column names also require delimiting.
Posted 13 May 2013Like others here, I use my own framework, though it's not released publicly. I found that creating my own framework basically taught me PHP properly. Not to say that I am expert in PHP, but before I started using a framework, my code was sloppy, inefficient, and clunky.
Posted 10 May 2013Alright, I just have 2 questions. With the removal of the Parent Company table, you made the Company table have a parentID and you made it have a foreign key to the companyID in the same table. Did I read that right?
Yep, so the parentID refers to the companyID of the same table. Keep in mind that you will need to make parentID nullable for the purposes of root nodes. If you want to learn about working with hierarchical data, I wrote a tutorial here, though it only covers MSSQL.
QuoteSecond, I tried searching for Microsoft parameter notation, but kept coming up with something else other than what you did. Could you provide me with either an explanation of it or a link to the documentation for it so I can read up on it?
In MSSQL, you declare variables (parameters) as @parameterName.
In MySQL, you declare regular variables as parameterName and session-wide variables as @parameterName.
In PHP PDO, you declare parameters as ? or :parameterName.
In PostgreSQL, you declare variables as parameterName.
So, when I said Microsoft parameter notation, I really meant Microsoft variable declaration, which is why you see queries with clauses like myTable.myColumn = @myParameter. You'll need to adjust the queries to match the syntax of whatever DB/DBA you are utilising.
- Member Title:
- = -1
- 38 years old
- June 24, 1974
- Years Programming:
- Programming Languages:
- HTML, XML, jQuery, PHP, SQL, MySQL, VBA, VBScript, PostgreSQL
- Website URL: