User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 375,245 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,187 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser:
Views: 2277 | Replies: 2
Reply
Join Date: Jul 2005
Posts: 72
Reputation: 010081 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
010081's Avatar
010081 010081 is offline Offline
Junior Poster in Training

please help with mysql_num_rows():

  #1  
Jul 6th, 2005
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'];
}
?>
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2005
Posts: 72
Reputation: 010081 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
010081's Avatar
010081 010081 is offline Offline
Junior Poster in Training

Re: please help with mysql_num_rows():

  #2  
Jul 7th, 2005
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

<?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'];
}
?>
Reply With Quote  
Join Date: May 2005
Posts: 16
Reputation: vark is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
vark vark is offline Offline
Newbie Poster

Re: please help with mysql_num_rows():

  #3  
Jul 7th, 2005
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
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb MySQL Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the MySQL Forum

All times are GMT -4. The time now is 4:43 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC