salman_ahad@yahoo.com Posted October 24, 2009 Share Posted October 24, 2009 I have 4 strings in MySQL db1 $string1 : Hello $string2 : Hi $string3 : Great $string4 : Thanks And I have 3 accounts MySQL db2 $User1 : $Pw1 $User2 : $Pw2 $User3 : $Pw3 expected result --------------- Hello goes to user1 Hi goes to user2 Great goes to user3 // all the users have been sent a message, so iterator should go to user 1 again Thanks goes to user1 Any code snippet please....THANKS Quote Link to comment https://forums.phpfreaks.com/topic/178825-alternate-messaging/ Share on other sites More sharing options...
severndigital Posted October 24, 2009 Share Posted October 24, 2009 you will have to associate the two tables in some way. IMO the best would be in MySQL by adding another field to the db2 referencing the id of the greeting in db1. This is the most dynamic way since then all you need to do to add another greeting is to add it to db1 and update db2 new field with the id. the you would pull the info in a join statement. Quote Link to comment https://forums.phpfreaks.com/topic/178825-alternate-messaging/#findComment-943401 Share on other sites More sharing options...
salman_ahad@yahoo.com Posted October 24, 2009 Author Share Posted October 24, 2009 I can work on the database. But I need a code snippet which calls alternate functions. (Switches between functions) Quote Link to comment https://forums.phpfreaks.com/topic/178825-alternate-messaging/#findComment-943591 Share on other sites More sharing options...
salman_ahad@yahoo.com Posted October 24, 2009 Author Share Posted October 24, 2009 I have a db Table1 contains these String messages Table2 contains these Users I need to write a test.php where you can help me with code snippet. expected result --------------- string1 to user1 string2 to user2 string3 to user3 string4 to user1 string5 to user2 Now what should be my code in test.php to send these alternating users with the data I have in another table?? Quote Link to comment https://forums.phpfreaks.com/topic/178825-alternate-messaging/#findComment-943644 Share on other sites More sharing options...
salman_ahad@yahoo.com Posted October 25, 2009 Author Share Posted October 25, 2009 any help guys Quote Link to comment https://forums.phpfreaks.com/topic/178825-alternate-messaging/#findComment-943816 Share on other sites More sharing options...
mikesta707 Posted October 25, 2009 Share Posted October 25, 2009 If you want someone to write code for you, i suggest you go to the freelance forum. This forum is for help with a script you are trying to write. but if you refuse to try, you won't get any help Quote Link to comment https://forums.phpfreaks.com/topic/178825-alternate-messaging/#findComment-943818 Share on other sites More sharing options...
salman_ahad@yahoo.com Posted October 25, 2009 Author Share Posted October 25, 2009 Any startup idea would help me pick up..... Quote Link to comment https://forums.phpfreaks.com/topic/178825-alternate-messaging/#findComment-944228 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.