TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 04-01-2012, 08:04 AM   #1 (permalink)
The Visitor
Newcomer 
 
Join Date: Apr 2012
Posts: 1
Thanks: 0
Aaditya Desai is on a distinguished road
Default Error while working on PHP Server Scripting

The error is in the line marked red can u tell me what is the error?


<?php
$link= mysql_connect('localhost','xxxxx','xxxxx');
@mysql_select_db('xxxxx','xxxxx','xxxxx',$link);
$query="SELECT * FROM table WHERE lname LIKE 'M%' ";
$result=mysql_query($query,$link);
$num=mysql_num_rows($result);
?>

<?php
$i=0;
while ($i < $num) {

$f1=mysql_result($result,$i,"fname");
$f2=mysql_result($result,$i,"lname");
?>
<tr>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f1; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f2; ?></font></td>
</tr>

<?php
$i++;
}
mysql_close();
?>
Aaditya Desai is offline  
Reply With Quote
Old 04-20-2012, 03:59 AM   #2 (permalink)
The Wanderer
 
Join Date: Apr 2012
Posts: 6
Thanks: 1
yunohoo is on a distinguished road
Default

The issue is not with mysql_num_rows() although I'm sure the error you're receiving says it is. The issue is with your mysql query not returning any results for mysql_num_rows() to work with. The error can be with your mysql query. It is best to firstly test your query in either a terminal(linux) or command prompt(windows) or phpmyadmin.

Since the structure of the sql is correct it's not a mysql issue either. So if your query runs(phpmyadmin or command-line verified) then the issue may be with your connection iformation.
Send a message via MSN to yunohoo
yunohoo is offline  
Reply With Quote
Old 11-10-2012, 07:34 AM   #3 (permalink)
The Contributor
 
Join Date: Oct 2012
Posts: 46
Thanks: 0
ww628815 is on a distinguished road
Default

Silver-based jewelry, toilet table sets and presents have attracted customers right away due to the designs and also , Tiffany Key Rings with the amazing workmanship. Demand for Tiffany jewelry was high inside the 1800s and remains so nowadays, despite the presence of the rather high initial price of most pieces.

Cheap Tiffany UK very features - quality craftsmanship and unique design- have caused Tiffany products to become copied worldwide. This company's jewelry is, inside the minds of several, the supreme possession among designer jewelry. However, Uk Tiffany Necklaces that couldn't afford a Tiffany original often consider the reasonable cost of a well-made copy.
ww628815 is offline  
Reply With Quote
Reply



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

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Beginner Guide #1 Hershey Absolute Beginners 1 11-07-2011 10:42 PM
PHP socket based communication with a python server tripy Advanced PHP Programming 7 07-15-2009 08:20 PM
What PHP Extensions are on your server? Nor General 8 03-17-2009 12:45 PM
Sliced Images not working in php site Kay1021 XHTML, HTML, CSS 5 06-03-2008 06:40 PM
working with Iframes in php JMHein Absolute Beginners 3 05-17-2008 03:40 PM


All times are GMT. The time now is 09:15 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design