Yea, that's fair enough. If OP really was concerned with scalability though, there's any number of optimisations you can make, one of the most important of which is the database technology itself. I...
Search:
Type: Posts; User: Artificial
Search: Search took 0.01 seconds.
- 27 Mar. 2013, 11:15pm
Thread: My web programming class
by Artificial- Replies
- 26
- Views
- 1,223
Yea, that's fair enough. If OP really was...
- 27 Mar. 2013, 12:11am
Thread: My web programming class
by Artificial- Replies
- 26
- Views
- 1,223
I was under the impression that provided the...
I was under the impression that provided the column in which you were joining on was UNIQUE, JOIN and IN would essentially resolve to the same execution plan in most database technology.
Also, in... - 26 Mar. 2013, 01:02am
Thread: My web programming class
by Artificial- Replies
- 26
- Views
- 1,223
You're absolutely right :p That was poor thinking...
You're absolutely right :p That was poor thinking on my part xD If you wanted a complete list of the user's friends, you could either alter the query (essentially merge two queries, one on the...
- 26 Mar. 2013, 12:27am
Thread: My web programming class
by Artificial- Replies
- 26
- Views
- 1,223
So, so say you wanted to retrieve the friends of...
So, so say you wanted to retrieve the friends of a user with id 1. Obviously if you were to use something like:
SELECT recipient FROM `friends` WHERE `user_id` = 1 AND STATUS = 1;
You would... - 25 Mar. 2013, 11:58pm
Thread: My web programming class
by Artificial- Replies
- 26
- Views
- 1,223
OK, that's not really an issue I guess. Have you...
OK, that's not really an issue I guess. Have you had any exposure to JOINs? Your query will have to join the two tables to retrieve the necessary information.
- 25 Mar. 2013, 11:17pm
Thread: My web programming class
by Artificial- Replies
- 26
- Views
- 1,223
Yea, although it's a fairly bad idea to establish...
Yea, although it's a fairly bad idea to establish a new connection in every function. Does that mean you're going to establish a connection for every CRUD operation? Database connections are...
- 25 Mar. 2013, 09:49pm
Thread: My web programming class
by Artificial- Replies
- 26
- Views
- 1,223
That's a terrible idea, and flies in the face of...
That's a terrible idea, and flies in the face of database normalisation principles :p You could do something like this:
http://i.minus.com/jTIZV7dE7nQJn.png
So friends is a separate table with...
Results 1 to 7 of 7