i got this message plz help ::

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/baje/public_html/Templates Management/index.php on line 17

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/baje/public_html/Templates Management/index.php on line 19 

its like this plz point out

session_start();
include_once('common/common.php');

// global variable declaration & assignment
$action = $_GET['action'];
$goto = $_GET['goto'];

$SQL = "SELECT * FROM filedb ORDER BY urlname DESC";
DB_connect();
$result = mysql_query($SQL);
$found = mysql_num_rows($result);
DB_close();
while ($row = mysql_fetch_array($result)) {
    $urlnameArray[] = $row['urlname'];
    $filenameArray[] = $row['path'];
}
?>

sorry i didn't copy all ,i'm new so get confused
its like this

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/baje/public_html/Templates Management/index.php on line 12

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/baje/public_html/Templates Management/index.php on line 14

File:

 <?php
session_start();
include_once('common/common.php');

// global variable declaration & assignment
$action = $_GET['action'];
$goto = $_GET['goto'];

$SQL = "SELECT * FROM filedb ORDER BY urlname DESC";
DB_connect();
$result = mysql_query($SQL);
$found = mysql_num_rows($result);
DB_close();
while ($row = mysql_fetch_array($result)) {
    $urlnameArray[] = $row['urlname'];
    $filenameArray[] = $row['path'];
}
?>

010081,
the first warning:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/baje/public_html/Templates Management/index.php on line 12

sometimes means that your not connected to the database.

vark

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.