Jump to content

stewart715

Members
  • Posts

    58
  • Joined

  • Last visited

    Never

Everything posted by stewart715

  1. Makes sense. Any prebuilt scripts that you can think of? Thanks for your help.
  2. Anyone know how to approach a product select like this: http://www.kestrelmeters.com/custserv/info.jsp?pageName=Interactive_Product_Selector Where it displays all the products and then constricts it based on criteria specified... I've looked around and can't find anything. Thanks.
  3. [quote author=stewart715 link=topic=114205.msg464642#msg464642 date=1162946835] [code] <?php //date("i")-10 means 10 minutes ago $time = mktime(0, 0, 0, 0, 0, 0, date("m"), date("d"),  date("Y"), date("H"), date("i")-10, date("s")); $sql2 = mysql_query("SELECT * FROM users WHERE last_login < $time"); $mem2 = mysql_fetch_array($sql2); $numr = mysql_num_rows($mem2); ?>[/code] maybe? [/quote]
  4. Ok, thanks for your help I'm trying to get a list of pending friend requests (a pending friendrequest has a value of 1 for received) so example.. TABLE: buddylist uid  buddy  received 1      7          1 3      5          1 1      8          0 1      3          1 TABLE: users uid  name 1    mike 7      joe 3    john 8      bill so select select buddy from buddylist where recieved =1 and uid = 1(we'll use 1 for example purposes instead of $user->uid)...then the join will compare the outputted buddy value with uid in users and will output the name that goes along with that user..thats fine..$sql works perfect.. however.. i need to have a variable that outputs that buddies uid as well..i hope i explained it well so i'll need the following output (with the example of tables above) [code]<a href="7">Joe</a> <a href="3">John</a> [/code]
  5. All help is much appreciated :) Thanks. The code below outputs all usernames that have the match shown in $sql (in $row). However, I also need to output a persons uid along with $row. However, I don't know how to combine this: [code]<?php $sql2 = "SELECT buddy         FROM buddylist         WHERE received = 1         AND uid = 1"; $res2 = mysql_query($sql2) or die (mysql_error()); while ($row2 = mysql_fetch_row($res2)) {     echo "$row2[0]<br />"; } ?>[/code] WITH THIS: [code]<?php $sql = "SELECT u.name         FROM buddylist b         INNER JOIN users u ON b.buddy = u.uid         WHERE b.received = 1         AND b.uid = 1" ; $res = mysql_query($sql) or die (mysql_error()); while ($row = mysql_fetch_row($res)) {     echo "$row[0]<br />"; } ?>[/code] SO THAT: [code]<?php echo $row2[0]; echo $row1[0]; ?>[/code] will output all matches of both like so: 2 Mike 3 Joe 5 Frank etc... Any ideas? Please! All help is appreciated :)
  6. [code] <?php $time = mktime(0, 0, 0, 0, 0, 0, date("m"), date("d"),  date("Y"), date("H"), date("i")-10, date("s")); $sql2 = mysql_query("SELECT * FROM users WHERE last_login < $time"); $mem2 = mysql_fetch_array($sql2); $numr = mysql_num_rows($mem2); ?>[/code] maybe?
  7. hold on i completely misread lol
  8. what unit of time is in your database? it's minutes right?
  9. i understand but i was giving an example..to explain..im trying to get a list of a users pending friend requests..so it matches buddy with uid and when receieved =1 that means its pending..so i need to produce a list of pending friends names..which i have above..but i also need to make a link that goes to their profile..but i need their UID from a query to do it..thanks for all your help though i really appreciate it
  10. thanks. and i could add that as a link as [code]<a href="uid">name</a>[/code]?
  11. Thank you. how would I place that as $uid though or some variable?
  12. maybe you haven't closed it with the necessary ; or } post the actual code
  13. Post the code that is outputting only one result please
  14. Hi, Barand help me with getting this far and i truly appreciate it. I actually donated because of it haha. But I need to make a link out of my result: [code]<?php $sql = "SELECT u.name         FROM buddylist b         INNER JOIN users u ON b.buddy = u.uid         WHERE b.received = 1         AND b.uid = 2" ; $res = mysql_query($sql) or die (mysql_error()); while ($row = mysql_fetch_row($res)) {     echo "<a href=\"$uid[0]\">$row[0]</a><br />"; } ?>[/code] I need to have an sql query (along with what I have above) that will simply SELECT buddy FROM buddylist WHERE uid = 2 AND received = 1. i need it to fetch the row just like it is above and outputting something like $uid so i can make a link of the persons username showing their username but having a link with their userid number thanks agian!!! so.. [code]in html    echo "<a href=\"$uid[0]\">$row[0]</a><br />"; would turn into <a href="2">name</a><br/>[/code]
  15. Edit. nevermind! thats perfect thanks so much!
  16. Fantastic. Thank you very much (: Now, what would I do to list the results? mysql_result doesn't work...
  17. Also, I'm not sure how to have it make a list of everything.. I know mysql_result would give me just one of the names how could I make it list the matches? Well, I guess first I need the query code lol. I've been working on this for so long and I can't get it.
  18. Yes kind of but i need it to output 'name' from users Thank you
  19. Good point. The site was just launched today actually. There are only a few users, who are my friends, who were testing the site before the launch. I edited my post above
  20. Please go to my site (: I need some feedback. Thanks! I've set up a test account with specific restrictions: Username: demo Password: popboard This account will expire in 1 week. With Popboard, you can: -Search for friends -Make profiles -Add friends to your friends list -Make personal friends groups as well as global friend groups -Customize profile, background, colors, images, fonts, everything with a built in CSS generator. -Upload photos and images to your personal gallery -Maintain a personal blog -Add your favorite quotes to a personal quotes page -Comment on users personal 'Board' -Send personal messages http://thepopboard.com/ Thanks!
  21. Also, I can't seem to find any tutorials on this
  22. Javascript Rich Text editor..can be implimented into PHP code http://www.dynamicdrive.com/dynamicindex16/richtexteditor/index.htm
×
×
  • 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.