0

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'];
}
?>

Edited by pyTony: fixed formating

2
Contributors
2
Replies
3
Views
12 Years
Discussion Span
Last Post by vark
0

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'];
}
?>

Edited by pyTony: fixed formating

0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.