Quantcast
Channel: Tech Support Guy
Viewing all articles
Browse latest Browse all 38405

xampp limitations?

$
0
0
I am trying to use a database i have successfully set up in xampp's phpMyAdmin (screen shot attached) but using the following code, I can't get ANY mysql_query results.
PHP Code:

function count_ads($make)
{
    
    
$sql "SELECT * FROM `adverts` WHERE `make`='$make'";
    
$res mysql_query($sql) or die(mysql_error());

    
$result mysql_num_rows($res);
}
        foreach (
$cat_array as $make)
        {
// Search by Make(Category) and get numbers...
            
            
$topic_foreach $make;
            
            
$single_class_records_total count_ads($make);

            if (
$single_class_records_total == NULL$single_class_records_total 0;
            
            if (
$topic_get != "RECENT" && $topic_get == array_search($topic_foreach$cat_array))
            {
                echo(
"<td class=\"classification_2\" ><a href=\"" $_SERVER["PHP_SELF"] . "?topic_get=$topic_number\">&nbsp $topic_foreach &nbsp ($single_class_records_total)</a> </td>");
            }
            else
            {
                echo(
"<td class=\"classification_1\" ><a href=\"" $_SERVER["PHP_SELF"] . "?topic_get=$topic_number\">&nbsp $topic_foreach &nbsp ($single_class_records_total)</a> </td>");
            }

            
$topic_number++;

            if (
$topic_number != count($cat_array) && substr_count($topic_number/6".") == 0)
            {
                echo(
"</tr>
                  <tr>"
);
            }
            else if (
$topic_number == count($cat_array) && substr_count($topic_number/6".") > 0)
            {
                echo(
"<td class=\"empty\">&nbsp</td></tr>");
            }

            else if (
$topic_number == count($cat_array) && substr_count($topic_number/6".") == 0)
            {
                echo(
"</tr>");
            }

        }

    } 

... maybe xampp has a limit on the number of tables or something? Because I can find no other reason for my script not to work?? Or maybe you can? It's been a hair-tearing time trying to suss this one:mad:

Attached Thumbnails
Click image for larger version

Name:	xamppSS.png
Views:	N/A
Size:	186.3 KB
ID:	217220  

Viewing all articles
Browse latest Browse all 38405

Trending Articles