Jump to content

darkcarnival

Members
  • Posts

    162
  • Joined

  • Last visited

Everything posted by darkcarnival

  1. well i know of a way to do it but it will require alot of extra work and i was hoping there was a built-in function to better ease this. but I'll read up on this kind of query and give it shot, hopefully it'll be what I'm looking for.
  2. Barand, just curious are you on dial-up or broadband? if broadband there should be a firewall on your router or modem that your ISP has in place, and if your running xp SP 2, there is also a built-in firewall.
  3. hi, i plan to improve a part of my script and it will require spliting a table into 2. now my question is, what way would be easiest in moving data into another table? thanks :)
  4. could be a firewall issue? might want to check your firewall settings.
  5. success! this works perfectly :D thanks a bunch shoz for the help. mark this as solved.
  6. well first the reg query is done followed by a num check from that. the read check is performed in a loop like so: [code]function search_results_newposts(){ global $db, $table2, $search_result, $search_result2, $logged_user; //output any topics. while ($row = mysql_fetch_assoc($search_result)) { $db->run = "select * from ebb_read WHERE Topic='$row[tid]' and user='$logged_user'"; $read_ct = $db->num_results(); $db->close(); if ($read_ct == 0){ $searchresults .= "<tr bgcolor=\"$table2\"> <td class=\"td\" width=\"50%\"><a href=\"viewtopic.php?bid=$row[bid]&amp;tid=$row[tid]\">$row[Topic]</a></td><td class=\"td\" width=\"50%\">$row[author]</td></tr>"; } } //output any posts while ($row2 = mysql_fetch_assoc($search_result2)){ $db->run = "SELECT * FROM ebb_topics where tid='$row2[tid]'"; $topic_r = $db->result(); $db->close(); //see if post is new. $db->run = "select * from ebb_read WHERE Topic='$row2[tid]' and user='$logged_user'"; $read_ct2 = $db->num_results(); $db->close(); if ($read_ct2 == 0){ $searchresults .= "<tr bgcolor=\"$table2\"> <td class=\"td\" width=\"50%\"><a href=\"viewtopic.php?bid=$row2[bid]&amp;tid=$row2[tid]&amp;pid=$row2[pid]#$row2[pid]\">$topic_r[Topic]</a></td><td class=\"td\" width=\"50%\">$row2[re_author]</td></tr>"; } } return $searchresults; }[/code] I almost think getting a exact number will be impossible wit the way i have the whole thing created. I mean i can live without a num listed for this part of the search if i have to ;)
  7. i would but theres 2 queries. one that searches based on the ladt time visited and another that checks to see if the post id is already marked as read in the read table. now the second query is done from a loop that outputs the results based on the first query. so its very hard to list the whole thing, esp when the thing is in like 3 different functions.
  8. hi, im working a search item for my news page and so far i have fixed a few things but i have 1 issue left. getting the number results. now the query used to find topics <= to the time the user logged in will display all the topics. so to fix that i had the read table check for those posts that were already marked as read. doing that gave the correct number of results to output. but now heres the problem. the part that would say how many results were found will not match the actual list. example: without the read check a search find 20 results. after the read check was added, the real number was 3, but it still says 20. so how can i output the real result number? if it sounds impossible, then say so and I'll have to not display the number results. if you know of a way to find out, please tell me as ive tried everything i can think of. thanks.
  9. actually im using cookies ;) and i got the problem solved, though now i have another problem. to solved it i forgot i had to check the read table i made. now i still have one issue and thats getting the correct number result. tried looping it but it doesnt seem to want to do that. here is how im doing that: [code] while ($row = mysql_fetch_assoc($search_result)) { $db->run = "select * from post_read WHERE Topic='$row[tid]' and user='$logged_user'"; $t_num = $db->num_results(); $db->close(); }[/code] i might be missing something but i cant think of what that is. if someone here knows, please tell me. thanks.
  10. hi, on a news program i made i want to allow my members to see what new articles were made since they last visited the site. pretty much what i want to do is exactly how phpbb and other bbs programs do. now looking at them i applied the same method but it doesnt seem to work. first off i added a colume last_visit which would have the last time they visited the site(in time()) then i made it do a search with the following query: [code]SELECT * FROM metal_posts WHERE Date>='$last_visit'[/code] now doing it that displayed 0 results everytime no matter what. changed >= to <= just displayed all of the news articles. so question is, what am i doing wrong? to let you know all the dates on my program are in time() format so format issue isnt the problem here. thanks
  11. i dont think i have pear installed on my server or does pear not need anything extra installed for it to work?
  12. hi, im want to improve my mailing list script i made for my site. the issue is i have a lot of users on it and the current way have it written now is too slow and i also fear the process is quitting since it takes about a minute to send it out to everyone. now if you wish to see how im currently doing it below is how im doing it: [code]$result = mysql_query("select * from email_list WHERE Status='Subscribed'") or die(mysql_error()); $headers = "From: member's monthly update<newsletter@metalstation1.com>\n"; //send out email. while ($row = mysql_fetch_array($result)) { set_time_limit(0); @mail($row['Email'], stripslashes($subject), stripslashes($mail_message), $headers); }[/code] now this way works but now that my mailinglist is growing im wondering if theres a better/faster way to send out the newsletter. thanks :)
  13. thanks :) i hate those days when i get blanks :@ now its comming back to me :)
  14. i feel dumb asking this but im having a blank here. whats does || mean? i cant remember what that ment and its bugging me cause i should know it. if you know please tell me so i can be a peace with my blank mind lol
  15. ok yeah that sounds simple enough :) thanks :)
  16. hi, on a program i made i would like to hide member-only categories but i do not know how to do it. currently the category will appear but when a gust enters it they get a access denied message. iidealy i would like it to be hidden from guests. question is, how do i do this? thanks :)
  17. hi, I wish to better improve my banning system on my member script by being able to ban a wildcard of items. like for example i would like to ban anyone who enters a hotmail account or some other free free mail account. i also would like to do this for IP's too. though I dont know how to do a wildcard check like this. any help on this would be welcomed. thanks :)
  18. heres a map of how i want it: if post is important and also either new,old, a poll, or locked the icon is set to important otherwise: new-new icon old-old icon ect like i said before like how phpbb or ipb. if the user marks the post as important it will keep the important icon no matter what. so in general yes I want only one icon to show. currently if the topic is important but i locked it from getting comments the lock icon takes over or if i make it a poll the poll take over. i know theres a way to do this, I just cant figure it out. I hope you all understand what i'm trying to say. Andyb, i tried your method and it seems to do what I want :) so thanks for that.
  19. nope that kills off the important icon from even working. isnt there a way to make a item important no matter what else the item could have. like phpbb for example, no matter what if its new/old, locked or has a poll that icon stays the same, thats what i want.
  20. ok then here how im doing it: [code]//decide on icon. if ($row['important'] == "yes"){ $icon = "$template_path/images/important.gif"; }elseif ($row['Locked'] == 1){ $icon = "$template_path/images/locked_topic.gif"; }elseif ($row['Type'] == "Poll"){ $icon = "$template_path/images/poll.gif"; }elseif ($read_status == "new"){ $icon = "$template_path/images/new.gif"; }elseif ($read_status == "old"){ $icon = "$template_path/images/old.gif"; }elseif ($reply_num >= 10){ $icon = "$template_path/images/hottopic.gif"; }[/code] setting each as a if statement only made it worse in case you plan on saying that.
  21. hi, I have a post icon system on my news page that has these options: important, new, old, popular, and locked now the problem comes with the important one. i want it to alway be the important icon when the news is important, nothing else. but I do not know how to do it. if you want to see how im doing it now reply back and I'll pop that code here for you. thanks.
  22. your kidding? ok ill have to rename that then. i thought order by was just not allowed but yes a warning should appear to let me know since ive been ripping my hair out over this all week. thanks a bunch.
  23. hey there, I got a new host for a new site i made and i have a bit of issue with the mysql system on the new host. first off they have register_globals set to off which i have made adjustment to but when i try to enter a query like this: insert into ebb_category (Name, Order) values ('$name', '$order') i get this error: [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Order) values ('General', '2')' at line 1 now that table has 3 columes but that colume is the id which i set to auto incredment, so any idea on how to make this work. much thanks.
  24. i voted no because i either use: notepad for my html projects and php design 2005 for my php codings. besides i would rather use dreamweaver than frontpage if i was into WYSIWYG editors.
×
×
  • 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.