Page 1 of 1

help me!

Posted: Tue Dec 14, 2004 2:39 am
by itsmani1
hello every one !
see the code given below!

Code: Select all

<?PHP
	  $QrCtry = "select country from tbl_university";
	  $ress = mysql_query($QrCtry);
	  $numm = mysql_num_rows($ress);

?>
now what i want to do is that i want to do is that i want to retrive only unique countries.
means if a country name exists twice in the tab_university i want it once only.
can any one help me regarding this.

and 2nd thing is that tried this:

Code: Select all

<?PHP

$input = "what do ya want for nothing?";
$hash = mhash (MHASH_MD5, $input);
print "The hash is ".bin2hex ($hash)."<br />\n";
$hash = mhash (MHASH_MD5, $input, "Jefe");
print "The hmac is ".bin2hex ($hash)."<br />\n";

?>
and instead of getting result i got:
Fatal error: Call to undefined function: mhash() in C:\mannan\mannan.php on line 11
can any body tell to over come it?
and plz. tell me how to download mambo

RE: Help Me

Posted: Tue Dec 14, 2004 3:14 am
by thomas777neo
For a unique set of data from a field:

SELECT DISTINCT field FROM table

As for your mhash problem, in your php.ini file. uncomment the line

extension=php_mhash.dll

then restart your webserver