Problem system
#1

Resolved..
Reply
#2

The extra id column is not really necessary. The row can be uniquely identified by the two userids.

If you want to display the current friends with their name then you should probably use a join. The above approach may be viable if or when prepared queries are added to the MySQL plugin, but for now it's probably too intensive on the server. The query should look somewhat like this:
PHP код:
SELECT friends.FriendIDusers.username FROM friends INNER JOIN users ON friends.friendID users.id WHERE AddBy = %
Reply
#3

Quote:
Originally Posted by Vince
Посмотреть сообщение
The extra id column is not really necessary. The row can be uniquely identified by the two userids.

If you want to display the current friends with their name then you should probably use a join. The above approach may be viable if or when prepared queries are added to the MySQL plugin, but for now it's probably too intensive on the server. The query should look somewhat like this:
PHP код:
SELECT friends.FriendIDusers.username FROM friends INNER JOIN users ON friends.friendID users.id WHERE AddBy = %
I do not understand.
If you look all IDs correct, it was not the problem, improvise I mean directly into a table name and you have but the problem is that only show the first id by showing 0 at all, but still check them, they look 0 depending how many are in the table on that userid.
Reply
#4

Help me, please.
Reply
#5

Quote:
Originally Posted by Vince
Посмотреть сообщение
The extra id column is not really necessary. The row can be uniquely identified by the two userids.

If you want to display the current friends with their name then you should probably use a join. The above approach may be viable if or when prepared queries are added to the MySQL plugin, but for now it's probably too intensive on the server. The query should look somewhat like this:
PHP код:
SELECT friends.FriendIDusers.username FROM friends INNER JOIN users ON friends.friendID users.id WHERE AddBy = %
I tried like you said but still not working.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)