| | |
Same problem
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jul 2006
Posts: 2
Reputation:
Solved Threads: 0
Hi i also have the same problem:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
result resource in /home/digital/up51/libs/dblib.inc on line 356
here is the script:
**=======================================================================//
// Get Members based on their individual loans
// Files which uses this function: form_collections.php
//========================================================================*/
function getMembers($loan_type_ID,$loan_accnt_ID)
{
global $link;
$new_temp = "CREATE TABLE temp_collections TYPE=InnoDB SELECT * FROM upcoop.loans_outstanding WHERE loan_type_ID ='$loan_type_ID'";
$resulta = mysql_query($new_temp,$link);
$new_query = "SELECT * FROM temp_collections";
$resultb = mysql_query($new_query,$link);
while ($row = mysql_fetch_array($resultb,MYSQL_ASSOC) ){
$query = "SELECT members.members_ID, members.first_name,members.mid_name,members.last_name,
temp_collections.loan_accnt_ID,temp_collections.monthly_amornt FROM members LEFT JOIN temp_collections ON
members.members_ID = temp_collections.members_ID
WHERE temp_collections.loan_type_ID = '$row[loan_type_ID]'ORDER BY last_name";
$result = @mysql_query($query,$link);
if (!$result)
die ("getMembers fatal error: ".mysql_error());
$ret = array();
while ($row = mysql_fetch_array($result) )
array_push($ret,$row);
return $ret;
}
}
pls help me...
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
result resource in /home/digital/up51/libs/dblib.inc on line 356
here is the script:
**=======================================================================//
// Get Members based on their individual loans
// Files which uses this function: form_collections.php
//========================================================================*/
function getMembers($loan_type_ID,$loan_accnt_ID)
{
global $link;
$new_temp = "CREATE TABLE temp_collections TYPE=InnoDB SELECT * FROM upcoop.loans_outstanding WHERE loan_type_ID ='$loan_type_ID'";
$resulta = mysql_query($new_temp,$link);
$new_query = "SELECT * FROM temp_collections";
$resultb = mysql_query($new_query,$link);
while ($row = mysql_fetch_array($resultb,MYSQL_ASSOC) ){
$query = "SELECT members.members_ID, members.first_name,members.mid_name,members.last_name,
temp_collections.loan_accnt_ID,temp_collections.monthly_amornt FROM members LEFT JOIN temp_collections ON
members.members_ID = temp_collections.members_ID
WHERE temp_collections.loan_type_ID = '$row[loan_type_ID]'ORDER BY last_name";
$result = @mysql_query($query,$link);
if (!$result)
die ("getMembers fatal error: ".mysql_error());
$ret = array();
while ($row = mysql_fetch_array($result) )
array_push($ret,$row);
return $ret;
}
}
pls help me...
•
•
Join Date: Jul 2004
Posts: 494
Reputation:
Solved Threads: 21
Please wrap code in [ code ] tags.
Are you sure the contents of your $result variable are what you're looking for? Take a close look at your code (and maybe echo a few things out) and verify this.
Are you sure the contents of your $result variable are what you're looking for? Take a close look at your code (and maybe echo a few things out) and verify this.
www.uncreativelabs.net
Old computers are getting to be a lost art. Here at Uncreative Labs, we still enjoy using the old computers. Sometimes we want to see how far a particular system can go, other times we use a stock system to remind ourselves of what we once had.
Old computers are getting to be a lost art. Here at Uncreative Labs, we still enjoy using the old computers. Sometimes we want to see how far a particular system can go, other times we use a stock system to remind ourselves of what we once had.
Take the warning suppression marker (@) out of this line of code:
so that you can see the error.
PHP Syntax (Toggle Plain Text)
$result = @mysql_query($query,$link);
If I've been a help please confirm by clicking the Add to Lafinboy's Reputation link in the header of this reply.
Lafinboy Productions
:: Website Design :: Website Development ::
Lafinboy Productions
:: Website Design :: Website Development ::
![]() |
Similar Threads
- Problem with Windows Update and WinXP (Web Browsers)
- Installing Windows 98 On VMware. Floppy problem (Windows 95 / 98 / Me)
- Windows XP keeps restarting since a new video card (Windows NT / 2000 / XP)
- Redhat Linux 6.2 - ipop3d problem? (*nix Software)
- Problem with T720 (Cellphones, PDAs and Handheld Devices)
- Connection Problems (Networking Hardware Configuration)
- Encoding (Unicode) problem in IE 6.0 (Web Browsers)
- .htaccess mod_rewrite problem (Linux Servers and Apache)
- Javascript/HTML problem!!! (JavaScript / DHTML / AJAX)
Other Threads in the PHP Forum
- Previous Thread: how to manipulate characters in strings
- Next Thread: php/mysql communication problem
| Thread Tools | Search this Thread |
apache api archive array autocomplete beginner binary broken cakephp checkbox class cms code cron curl database dataentry date display duplicates dynamic ebooks echo email emptydisplayvalue error execute explodefunction file files firstoptioninphpdroplist folder form forms function functions google href htaccess html image include insert ip javasciptvalidation javascript joomla keywords limit link login mail matching mediawiki menu mlm multiple mysql number oop paypal pdf php phpincludeissue problem query radio random recursion recursive remote script search server sessions shot sms source sp space speed sql subdomain subscription syntax system table tag tutorial tutorials update upload url validator variable vbulletin video web white youtube





