+ Reply to Thread
Results 1 to 1 of 1

Thread: Help with some PHP

  1. #1
    dharmil's Avatar
    dharmil is offline x10 Elder dharmil is an unknown quantity at this point
    Join Date
    Sep 2005
    Location
    Avenel New Jersey
    Posts
    828

    Help with some PHP Arcade Mod i Made

    i creadred a arcde mod but i mest up doing the page numbering for the games
    can some opne help out with tihs
    the page is loated : http://www.dharmil.info/arcade.php
    Source Code: http://www.dharmil.info/arcade.phps

    i tihnk this is where i mest up:
    PHP Code:
        <?php 
        
    // Define search query
        
    if (strlen($s_search)>0$sqlquery .= " WHERE {$s_rsearch} LIKE '%{$s_search}%'";
        
    // Did we use a category or the search box?
        
    if ($s_cat>0)
        {
            if (
    strlen($s_search)>0)
            {
                
    $sqlquery .= " AND game_cat = {$s_cat} ORDER BY game_name {$s_sorto}";
            }
            else
            {
                
    $sqlquery .= " WHERE game_cat = {$s_cat} ORDER BY game_name {$s_sorto}";
            }
        }
        else
        {
            
    $sqlquery .= " ORDER BY {$s_sortby} {$s_sorto}";
        }
    ?>
    PHP Code:
    <?
        
    // Fetch game count and generate pages, after using filter
        
    $result mysql_query('SELECT COUNT(game_id) FROM arcade_games '.$sqlquery);
        
    $num_games2 mysql_result($result);
        
    $currec $s_page $s_nump;
        
    $kolvop ceil($num_games2 $s_nump);
        
    $cp = ($kolvop == 0$kolvop);
        
    $nump $s_nump;
        
    // Generate page links
         
    if ($cp>1)
            {
                echo 
    '<p>'Pages,':';
                for (
    $i=1;$i<=$cp;$i++)
                if ((
    $i-1)==$s_page) echo $i ";
                else echo 
    ' <a href="'.$_SERVER['PHP_SELF'].'?page='.($i-1).'">'.$i.'</a> ';
            }
            echo 
    '<p>';
        
    // Output Games, highscores, description
        
    ?>
    This is the Error i get

    Code:
    Warning: Wrong parameter count for mysql_result() in /home/dharmilx/public_html/dharmil/arcade.php on line 332

    EDIT: Problem Solved A modorater can close this if they want
    Last edited by dharmil; 08-12-2006 at 11:56 AM.

+ Reply to Thread

Similar Threads

  1. [PHP] MySQL and PHP
    By Bryon in forum Tutorials
    Replies: 43
    Last Post: 03-24-2011, 07:27 AM
  2. [PHP] Variables in PHP
    By Bryon in forum Tutorials
    Replies: 15
    Last Post: 01-29-2009, 09:46 AM
  3. tons of PHP Resources
    By Chris S in forum Scripts & 3rd Party Apps
    Replies: 10
    Last Post: 01-16-2009, 10:07 AM
  4. [PHP] PHP For Starters
    By Complex in forum Tutorials
    Replies: 24
    Last Post: 06-14-2008, 11:40 PM
  5. Unstand PHP?
    By o0slowpaul0o in forum Tutorials
    Replies: 8
    Last Post: 01-07-2008, 09:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers