|
| |
Mysql error--> how fix? I think is about data integrity ?
View related threads:
(in this forum
| in all forums)
|
Logged in as: Guest
|
|
|
lsfphelpls
Posts: 519 Joined: 3/16/2005 Status: offline
|
Mysql error--> how fix? I think is about data integr... - 4/7/2009 15:49:07
Php error The below error[see below for code] is done due to no data in database tables or due to NULLs ? is it about data integrity ? Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/content/p/o/l/polisch123/html/indexaffv.php on line 139 Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/content/p/o/l/polisch123/html/indexaffv.php on line 142 Unable to execute query. Please try again later. code: $query14 = "SELECT * FROM $AVisitorsTable WHERE countNumVisitor='$countNumVisitor'"; $result14 = @mysql_query($query14,$linkid); $row = mysql_fetch_assoc($result14); // line 139 $HasAccountDB = $row['HasAccount']; //$HasAccountDB=mysql_result($result14,0,"HasAccount"); mysql_free_result($result14); questions for a query return only ONE row may use either of: [these can also used in a loop] 1. $row = mysql_fetch_assoc($result14); $HasAccountDB = $row['HasAccount']; 2. $HasAccountDB=mysql_result($result14,0,"HasAccount"); ???
|
|
|
|
Giomanach
Posts: 6187 Joined: 11/19/2003 From: England Status: offline
|
RE: Mysql error--> how fix? I think is about data in... - 4/8/2009 7:27:34
mysql_fetch_assoc This argument will fetch the data associated with the records you're trying to retrieve - and it will always take the last row if two have the same data. Have you tried mysql_fetch_array?
_____________________________
|
|
|
|
lsfphelpls
Posts: 519 Joined: 3/16/2005 Status: offline
|
RE: Mysql error--> how fix? I think is about data in... - 4/8/2009 11:01:48
for one record this is valid and do not need loop , correct ?
|
|
|
|
lsfphelpls
Posts: 519 Joined: 3/16/2005 Status: offline
|
RE: Mysql error--> how fix? I think is about data in... - 4/8/2009 11:52:25
$query15 = "INSERT INTO $AVisitorsTable VALUES('$countNumVisitor','$AIDc',9,NULL,'No',0.0,0.89)"; in MySQL: this is correct if 1st col is number[integer],2nd string,3rd number[integer],4th string or number, and 5th string and 6th&7th float or double ?
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|