Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,161,133 members, 7,845,764 topics. Date: Friday, 31 May 2024 at 01:36 AM

Unwanted Error Message - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Unwanted Error Message (725 Views)

How Do I Fix "Player.exe Has Stopped Working" Error Message. / Please What Should I Do? I'm Getting Error Message When Trying To Compile Java! / Google Chrome Profile Version Error. Error Message (2) (3) (4)

(1) (Reply) (Go Down)

Unwanted Error Message by ckdoublene: 7:01pm On Jan 23, 2011
the below code works but I get the below message every time?
<?php
mysql_connect(localhost,root,""wink;
mysql_select_db(prerentdb) or die( "Unable to select database"wink;
$result=mysql_query($query);
$num=mysql_numrows($result);

$query = "INSERT INTO payhist (name,apt,amtpaid,rentdue,prevbal,
hudpay,tentpay,datepaid,late,comments,paidsum)
Select name,apt,
amtpaid,rentdue,prevbal,hudpay,tentpay,datepaid,late,comments,
paidsum From payments WHERE paidsum < rentdue OR late = 'L'";

$stat = mysql_query($query) or die('Query failed: ' . mysql_error() . " - query: $query"wink;   
echo "data inserted</font>

"; 
mysql_close();

?> 
Warning: mysql_numrows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\hofiles\lateinsert.php on line 4
data inserted
Re: Unwanted Error Message by Nobody: 12:11am On Jan 24, 2011
By Resource it refers to the Connection Resources
which is $link=mysql_connect(xx,xx,xx); mysql_numrows(Bleep,$link); ta da and it will work but i advise to use OOP MYSQL
Re: Unwanted Error Message by kanirip: 2:34am On Jan 24, 2011
I was going to ask what was the error message the OP wanted! grin
Re: Unwanted Error Message by joefazee(m): 1:56pm On Jan 25, 2011
Avoid hardcore coding and lean ActiveRecord (use framework)

(1) (Reply)

Translator Software / Mobile Computing/application/development: Where To Start. / For Programmers In

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 8
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.