ProjectET Glitch.

Status
Not open for further replies.

ProLegitZ

Jacob is here bitch !
May 11, 2012
606
56
$query = $db->query( "SELECT * FROM news_categories" );
Is The Code,

<b>Fatal error</b>: Call to a member function query() on a non-object in <b>C:\xampp\htdocs\index.php</b> on line <b>164</b><br />
Is The Error Help meh :3
 

ProLegitZ

Jacob is here bitch !
May 11, 2012
606
56
It could be a line before that, The numbers are not always correct LOL

Code:
    </head>
 
    <body>
 
        <div class="wrapper">
 
            <div class="title">
 
                News Archive
           
            </div>
 
            <div class="content" align="center" style="border-bottom: 1px #eee solid;">
           
                Change category:
           
                <select onchange="window.location = '?cat=' + this.value">
                   
                    <option>Please select...</option>
                   
                    <?php

Those are the lines,
no glitch i see.
 

ProLegitZ

Jacob is here bitch !
May 11, 2012
606
56
$query = mysql_query( "SELECT * FROM news_categories" );
?
the whole code is:
Code:
            <?php
                        $query = $db->query( "SELECT * FROM news_categories" );
                       
                        while( $array = $db->assoc( $query ) ) {
                       
                            echo "<option value=\"{$array['id']}\">";
                            echo $array['name'];
                            echo "</option>";
                       
                        }
                    ?>
 

DaLightz

See ya'll in the afterlife.
May 19, 2012
1,136
262
the whole code is:
Code:
            <?php
                        $query = $db->query( "SELECT * FROM news_categories" );
                     
                        while( $array = $db->assoc( $query ) ) {
                     
                            echo "<option value=\"{$array['id']}\">";
                            echo $array['name'];
                            echo "</option>";
                     
                        }
                    ?>

Code:
<?php
    $query = mysql_query("SELECT * FROM  news_categories  ORDER BY `id` DESC");
   {
        echo '<option value=\"{$array['id']}\">        ';
        echo  $array['name'];
        echo '</option>';
        }
 
        while($row = mysql_fetch_array($query)){
 
}
       // Over here, it will show the content you choose...
 
    ?>
 

ProLegitZ

Jacob is here bitch !
May 11, 2012
606
56
Code:
<?php
    $query = mysql_query("SELECT * FROM  news_categories  ORDER BY `id` DESC");
  {
        echo '<option value=\"{$array['id']}\">        ';
        echo  $array['name'];
        echo '</option>';
        }
 
        while($row = mysql_fetch_array($query)){
 
}
      // Over here, it will show the content you choose...
 
    ?>
thanks it worked :]
ProjectET will be released in 3-4 days
 
Status
Not open for further replies.

Users who are viewing this thread

Top