Jump to content

New script help


ambo

Recommended Posts

:( not very insightful

 

 

Do you know PHP, because no one here wants to write this script for you...I mean, people on this forum are here to help, not do it for you.  And I was serious.  You should learn PHP, and write one yourself.  In the amount of time it would take to mash together a solution that probably would break easily, you could have started writing your own login system.

Link to comment
https://forums.phpfreaks.com/topic/126386-new-script-help/#findComment-653568
Share on other sites

You'd have a friends table with one-to-many relationships with each userid.  E.x:

CREATE TABLE friends (

   id INT NOT NULL AUTO_INCREMENT,

   user_id INT NOT NULL,

   f_id id INT NOT NULL

   accepted INT NOT NULL

);

 

Then, you'd need to do joins on it to get back your friend data:

 

SELECT u.* FROM friends AS f INNER JOIN users AS u ON f.friend_id = u.user_id WHERE f.user_id = '1' AND f.accepted='1';

Link to comment
https://forums.phpfreaks.com/topic/126386-new-script-help/#findComment-653570
Share on other sites

I have the login system i made the profile and edit profile i was asking a question i didnt need a chat about how i should learn php i didnt ask you to write it for me i said ideas like some insight as to how i should tackle it why i posted again

I was wondering how i should struture the database would i add a friends variable to my users table or create a freiends table

 

Link to comment
https://forums.phpfreaks.com/topic/126386-new-script-help/#findComment-653571
Share on other sites

I have the login system i made the profile and edit profile i was asking a question i didnt need a chat about how i should learn php i didnt ask you to write it for me i said ideas like some insight as to how i should tackle it why i posted again

I was wondering how i should struture the database would i add a friends variable to my users table or create a freiends table

 

 

Well, you SHOULD learn PHP before coding PHP.  I'm pretty sure C programmers don't learn C after writing 10 programs. >_<

Link to comment
https://forums.phpfreaks.com/topic/126386-new-script-help/#findComment-653573
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.