Showing entries 1 to 1
Displaying posts with tag: letsgetnuts.com (reset)
Can you use a stored procedure in a subquery? I don?t think so. (MySQL)

I do not think you can use the result of a stored procedure in an ad-hoc subquery.

On my social network, LetsGetNuts.com, I have a Friend table. This is the structure:

mysql> describe Friend;
+—————-+—————+——+—–+———+——-+
| Field | Type | Null | Key | Default | Extra |
+—————-+—————+——+—–+———+——-+
| fkUser | int(11) | YES | MUL | NULL | |
| fkFriend | int(11) | YES | MUL | NULL | |
| confirmed | enum(’Y',’N') | YES | MUL | NULL | |
| confirmed_date | date | YES | | NULL | |
+—————-+—————+——+—–+———+——-+
4 rows in set (0.02 sec)

The issue here is that building a list of the friends of a certain user involves using a UNION, and I frequently need to use the concept of IN (FRIENDSLIST). I was …

[Read more]
Showing entries 1 to 1