*

Recent

Author Topic: Deactivate Games  (Read 6178 times)

am-fs

  • Owner
  • Developer
  • Full Member
  • ******
  • Posts: 228
  • Force: +1/-0
    • Great Flash Games
Deactivate Games
« on: October 23, 2011, 04:04:32 PM »
I need to deactivate some games but the active statment is not listed on some files.

do i just add
Code: [Select]
&& active='1' too the ones that needs it? before ORDER???

*browse*
Code: [Select]
[code]$r2 = "SELECT * FROM dd_games WHERE category='$ID' && active='1' ORDER BY name ASC LIMIT ".$limits.",".$max ;
home
Code: [Select]
$r = $db->query(sprintf('SELECT * FROM dd_games ORDER BY rand() LIMIT '.$limits.','.$limitboxgames.' '));
most
Code: [Select]
$r = $db->query(sprintf('SELECT * FROM dd_games ORDER BY views DESC LIMIT '.$limits.','.$max.' '));
new
Code: [Select]
$r = $db->query(sprintf('SELECT * FROM dd_games ORDER BY dateadded DESC LIMIT '.$limits.','.$max.' '));
play rand game
Code: [Select]
$rrb = $db->query('SELECT * FROM dd_games ORDER BY RAND() LIMIT 0,6');
search
Code: [Select]
$r = mysql_query("SELECT * FROM dd_games WHERE name LIKE '%$keyword%'") or die(mysql_error());[/code]

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: Deactivate Games
« Reply #1 on: October 23, 2011, 05:10:45 PM »
Yupperz, looks that way lol
Don't hate on me for that one.. oh kurrrrtttt  :D

Dillon

  • Developer
  • Sr. Member
  • ******
  • Posts: 340
  • Force: +3/-0
    • Arcade Freak
Re: Deactivate Games
« Reply #2 on: October 23, 2011, 05:12:59 PM »
i noticed that too i just ignored it lol

am-fs

  • Owner
  • Developer
  • Full Member
  • ******
  • Posts: 228
  • Force: +1/-0
    • Great Flash Games
Re: Deactivate Games
« Reply #3 on: October 23, 2011, 05:16:12 PM »
So it would be
Code: [Select]
$r = $db->query(sprintf('SELECT * FROM dd_games ORDER BY rand() LIMIT '.$limits.','.$limitboxgames.' '));
change to
Code: [Select]
$r = $db->query(sprintf('SELECT * FROM dd_games && active='1' ORDER BY rand() LIMIT '.$limits.','.$limitboxgames.' '));
I dont use WHERE or something??

didnt work on my test site?

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: Deactivate Games
« Reply #4 on: October 23, 2011, 05:27:37 PM »
mhmm you gotta use WHERE
Code: [Select]
$r = mysql_query("SELECT * FROM dd_games WHERE `active`='1' ORDER BY rand() LIMIT $limits,$limitboxgames");

kurt

  • Developer
  • Hero Member
  • ******
  • Posts: 634
  • Force: +16/-1
Re: Deactivate Games
« Reply #5 on: October 24, 2011, 12:55:30 AM »
Hey am-fs, I can't read your code. When ya post it, could ya please leave a couple lines between it and the open code tag, and the close code tag? Just a couple lines buffer and I can read it easier lol.

Yea, you have to have the and active in the SQL statement. I though I had that in there. Sorry if I left it out.

am-fs

  • Owner
  • Developer
  • Full Member
  • ******
  • Posts: 228
  • Force: +1/-0
    • Great Flash Games
Re: Deactivate Games
« Reply #6 on: October 24, 2011, 06:28:23 PM »
Sure thing Kurt ;)

I couldn't figure it out on some of them so i will deal with it, till i have more time.

Thats why i was asking, i had to use AND and WHERE on some .... adam didnt say that ... lol  ;D

kurt

  • Developer
  • Hero Member
  • ******
  • Posts: 634
  • Force: +16/-1
Re: Deactivate Games
« Reply #7 on: October 24, 2011, 10:32:14 PM »
He's a good kid, knows some coding. But shhhhh don't tell him that, might get a swelled head lol.

And Adam, that goes for you too please, buffer your code tags with a couple extra lines before and after the code you post? I can't read yours either :p

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: Deactivate Games
« Reply #8 on: October 25, 2011, 12:25:23 AM »
I over look things and assume its correct at times lol sorry. I think I was tired and was rushing to get to sleep, but wanted to reply to all the posts before I crashed.

Getting old, Kurt? or using IE again?  :D
You and your old secure boxes :P gotta get Chrome, or at least Firefox lol

Dillon

  • Developer
  • Sr. Member
  • ******
  • Posts: 340
  • Force: +3/-0
    • Arcade Freak
Re: Deactivate Games
« Reply #9 on: October 25, 2011, 12:26:32 AM »
Opera FTW!

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: Deactivate Games
« Reply #10 on: October 25, 2011, 12:34:49 AM »
Blahhh lol and its the ugliest thing, well at least on Ubuntu 11.04

kurt

  • Developer
  • Hero Member
  • ******
  • Posts: 634
  • Force: +16/-1
Re: Deactivate Games
« Reply #11 on: October 27, 2011, 09:38:11 PM »
Older than dirt to you sonny!  And I have both IE and FF. And its not paranoia if they really are out to get you, and the internet really is out to get you. Don't believe me? Go online using a Windows box with no firewall or anti virus. :p

I wish I had a Linux install to work on lol. I need me another laptop hard drive so that I can install it and work from my chair. Think the memory is next though, then maybe a drive.

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: Deactivate Games
« Reply #12 on: October 28, 2011, 10:47:01 PM »
lol yeah you do need Linux.

But you could just use AVG? I mean from my experience using Windows I always was safe using AVG. I used to use Norton, I had 27 trojan viruses while using it.. never detected one. As soon as I uninstalled Norton and installed AVG all viruses were found and removed.
I think that is the easiest and safest way if you wanna keep using Windows.

But yes get a new hard drive :P and memory lol

Frank

  • Sr. Member
  • ****
  • Posts: 257
  • Force: +4/-0
Re: Deactivate Games
« Reply #13 on: October 29, 2011, 02:05:48 AM »
Hey am-fs, I can't read your code.

In SMF css find this block

/* A code block - maybe even PHP ;). */

And change it all to this.

Code: [Select]
/* A code block - maybe even PHP ;). */
.code
{
color: #000000;
background-color: #fafafa;
font-family: "courier new", "times new roman", monospace;
font-size: 1.1em;
line-height: 1.3em;
/* Put a nice border around it. */
border: 1px solid #000000;
margin: 1px auto 1px auto;
padding: 12px;
width: 99%;
/* Don't wrap its contents, and show scrollbars. */
white-space: nowrap;
overflow: auto;
/* Stop after about 24 lines, and just show a scrollbar. */
max-height: 24em;
}

Then we'll all be able to read it without squinting!  ;D