cane23
0
Light Poster
Recommended Answers
Jump to Postcreate a function wherein the return value is the $dbarray. $dbarray = mysql_fetch_array($result); return $dbarray;
Jump to Postfunction getPrerequisites($prerequisite) { //your sql statement here $q= 'SELECT parameters FROM rules WHERE type="$prerequisite"'; //your connection here $results = mysql_query($q, $connection); --> put your type of database connection here. //fetch the results as $dbarray $dbarray = mysql_fetch_array($results); //return an array of data return $dbarray; }
Jump to Postto use that it should be like this
$arr=getPrerequisites($yourprerequisite); print_r($arr);
Jump to Postcheck your mysql connection.
or if you want post your code here and I will help you.
All 13 Replies
phpbeginners
1
Posting Whiz in Training
cane23
0
Light Poster
phpbeginners
1
Posting Whiz in Training
cane23
0
Light Poster
phpbeginners
1
Posting Whiz in Training
cane23
0
Light Poster
phpbeginners
1
Posting Whiz in Training
cane23
0
Light Poster
phpbeginners
1
Posting Whiz in Training
cane23
0
Light Poster
cane23
0
Light Poster
phpbeginners
1
Posting Whiz in Training
cane23
0
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.