Jump to content

Buddyb3ar

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Buddyb3ar's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. WOO! Thank you very much! As I've been working with this, I've been looking into joining queries, and it seems like I've been making this a bigger problem then it should be. Well, my problem is solved, so thank you all very much!
  2. Well, that sort of worked. Now it's showing all of of $users contacts, even the ones that are currently in the online table.
  3. on the "user_contacts" table, there are: "id", "user", "contact", "label". and on "online" there are: "onlineusr", "onlineIP", "onlinetime". I tried to make a different query, however, it still doesn't work. $mailrows = $db->GetAll(" SELECT user_contacts.* FROM user_contacts LEFT JOIN online ON user_contacts.contact = online.onlineusr WHERE user_contacts.contact IS NULL AND user_contacts.user='$user' ORDER BY user_contacts.contact ASC");
  4. Alright, I see what you are both saying. Then, I guess I'm looking for a way to make a "does not equal" join.
  5. I'm having some troubles with joining the following mySQL query: $contactrows = $db->GetAll("SELECT user_contacts.*, online.* FROM user_contacts, online WHERE user_contacts.contact != online.onlineusr AND user_contacts.user='$user' ORDER BY user_contacts.contact ASC"); (using adoDB). I'm trying to pull a list off contacts (from the table "user_contacts") and checking if the contacts aren't online (from table "online"). I'm having problem with that query, though. Instead of coming out with a list of users that are offline, it returns with the user's contacts repeated for each row in the online table. I'm not exactly sure if that is extremely clear (I'm having a little trouble explaining this), but (if for example, three people are viewing the site), instead of putting a list of: online user 1 offline user 2 user 3 It's showing something like online user 1 offline user 1 user 1 user 2 user 2 user 2 user 3 user 3 user 3 I think that clears it up a little (if you can't tell, I'm not exactly an expert with mySQL). Can someone help me with this query problem? I'd appreciate it a lot. I've been trying to fix this for a few days, haha. (:
  6. You do have a point. I guess I'll do that. Thanks for the help (:
  7. I'm not very experienced with mod_rewrite or the rewrite engine, but I know enough to get me by. Recently though, I've ran into a problem. I need to use standard $_GET variables, but still be able to use mod_rewrite to rewrite the URL. So, I basically want a URL that looks like this: www.mysite.net/register/?error=1 I'm not really sure how to do this, but I know there is a way (I've seen other sites do this correctly). Does anyone have any idea how to solve my problem?
  8. OH WOW! Thank you so much! It just took a little tweaking of the code here and there, and I got it to work perfectly. Thank you very very much! I can now work with the code to change it how I need too.
  9. [code] <?php $result = mysql_query("   SELECT     *   FROM     notes ORDER BY RAND() "); $total = mysql_num_rows($result); page_header($css, ""); index_header($total); $number_of_categories_in_row = 3; while ($row = mysql_fetch_array($result)) { $text = markerconvert($row[content]);   $result_array[] = "<div id=\"".$row[ID]."\" class=\"notecontent\" style=\"border: 1px ".$row[bclr]." solid; background-color:".$row[bgclr]."; font-size:10; width:160px; height:100px;\">".$text."</div>"; } mysql_free_result($result); foreach ($result_array as $category_link) {   if ($counter == $number_of_categories_in_row) {     $counter = 1;     $result_final .= "\n</tr>\n<tr>\n";   } else $counter++;   $result_final .= "\t<td>" . $category_link . "</td>\n"; } if ($counter) {   if ($number_of_categories_in_row - $counter)     $result_final .= "\t<td colspan='" .       ($number_of_categories_in_row - $counter) . "'>&nbsp;</td>\n"; } index_footer($result_final); page_footer(); ?> [/code] See, the problem is that I don't know how to fit that into there.
  10. I'm not sure it'd be something, but the . before the = in [code] $message .= "http://www.funnyemailforwards.com/apex/limitedemailresults.php"; [/code] Could cause a problem. You could also do something like [code] <?php while ($row = mysql_fetch_array($emailquery)) {   $to = "{$row[email]}";   $subject = "Funny Email Forwards Database Results"; $message = array();   $message[] = "You can see the results at this page: ";   $message[] = "http://www.funnyemailforwards.com/apex/limitedemailresults.php";   mail($to, $subject, $message); ?> [/code]
  11. When you echo something that's not a variable, it should be within quotes... right? [code] echo "&quot;Title: &quot;. $news['title'] . &quot;&lt;br&gt;n&quot;"; echo "$news['text'] .&quot;&lt;br&gt;n&quot;";  echo "&lt;&quot;---------------------n&quot;"; [/code] So, if it shouldn't be in quotes if it's something like [code] $code = "&quot;Title: &quot;. $news['title'] . &quot;&lt;br&gt;n&quot;"; print $code; [/code] [b]Edit[/b] Print/echo same thing. Haha. I just choose print over echo.
  12. Well, I'll start out by saying I'm working on a project codenamed "rewrite" for the moment. If you want to see the idea, you can look it up yourself, since that's not the point of this topic. [url=http://www.black-winged.net/truth/]http://www.black-winged.net/truth/[/url] If you look, you may notice the growing amount of secrets that is becoming a big problem, especially for dial-up users. Also, you may notice that the secrets randomized everytime you refresh. Since I know it is impossible to keep the secrets randomized while also broken into pages, would it be possible to sort the secrets by IDs and then randomize the the secrets on that page? If that's possible, how would I do that while keeping them in columns of three? If you need to see some of the code that I used now, just ask. :/ Thanks, Dan
×
×
  • 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.