•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 374,010 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,880 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 PHP advertiser: Lunarpages PHP Web Hosting
Views: 159 | Replies: 2
![]() |
•
•
Join Date: May 2008
Posts: 4
Reputation:
Rep Power: 0
Solved Threads: 0
OK, I'm new to PHP, and working with someone else's code. Kinda got thrust into this. I keep getting these two errors everytime someone tries use a online application page:
PHP Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in F:\home\admissions\application\appadmin\dataset.php on line 27
PHP Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in F:\home\admissions\application\appadmin\dataset.php on line 29
I've looked around at other issues involving this, but I can't seem to find anything similar to this code. Here is the code that it is referring to:
Anyone see anything that doesn't look right in there? This is for an application that is completed online, sent to MySQL, and then from there the admin people can process it and send it on to another system called POISE. Any help in this would be greatly appreciated.
Thanks,
Charles...
PHP Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in F:\home\admissions\application\appadmin\dataset.php on line 27
PHP Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in F:\home\admissions\application\appadmin\dataset.php on line 29
I've looked around at other issues involving this, but I can't seem to find anything similar to this code. Here is the code that it is referring to:
<?php
require("admApp.inc");
//require('index.php');
class datastuff{
/**
* Returns a single record with all values
*
* @param string $t dB table
* @param string $a column name WHERE statement
* @param string $c column value for WHERE
* @param string $a2 AND col name
* @param string $c2 col value of AND
* @param string $o ORDER by value
* @param string $s sort order ASC DESC RAND
* @return Array of data values
*/
function getDataSimple($t,$a,$c,$a2,$c2,$o,$s){
datastuff::dataSet();
$setSQL="SELECT * FROM ".db_name.".".$t." ";
$setSQL .= $a != "" ? "WHERE ".$a." = '".$c."'" : null;
$setSQL .= $a2 != "" ? " AND ".$a2." = '".$c2."'" : null;
$setSQL .= $o != "" ? " ORDER BY ".$o." ".$s.";" : null;
$set = mysql_query($setSQL);
$row_set = mysql_fetch_assoc($set);
mysql_free_result($set);
return $row_set;
}
/**
* Mysql connect
*
*/
function dataSet(){
db_link;
}
}
?>Anyone see anything that doesn't look right in there? This is for an application that is completed online, sent to MySQL, and then from there the admin people can process it and send it on to another system called POISE. Any help in this would be greatly appreciated.
Thanks,
Charles...
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
- Learning PHP but problem with script (PHP)
- Problems using a php generator (PHP)
- emails sent to bulk folder....(Is this a php problem?) (PHP)
- PHP and JAVA vs .NET (IT Technologies and Trends)
- I think this is a php problem? (PHP)
- Large Array Problem (PHP)
Other Threads in the PHP Forum
- Previous Thread: Upload image using PHP and AJAX
- Next Thread: utopia..but i need help in my obstinacy to optimism


Linear Mode