This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
error_reporting(0); | |
include("template.class.php"); | |
$db_host = "localhost"; | |
$db_user = "root"; | |
$db_pass = ""; | |
$db_name = "test"; | |
$connect = mysql_connect ($db_host, $db_user, $db_pass) or die ("Could not connect to MySQL Database"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
error_reporting(0); | |
include("template.class.php"); | |
$db_host = "localhost"; | |
$db_user = "root"; | |
$db_pass = ""; | |
$db_name = "test"; | |
$connect = mysql_connect ($db_host, $db_user, $db_pass) or die ("Could not connect to MySQL Database"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELIMITER $$ | |
DROP PROCEDURE IF EXISTS `geodist` $$ | |
CREATE PROCEDURE geodist (IN userid int, IN dist int, IN lim int) | |
BEGIN | |
declare mylon double; | |
declare mylat double; | |
declare lon1 float; | |
declare lon2 float; | |
declare lat1 float; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELIMITER $$ | |
DROP PROCEDURE IF EXISTS `geodist` $$ | |
CREATE PROCEDURE geodist (IN userid int, IN dist int, IN lim int) | |
BEGIN | |
declare mylon double; | |
declare mylat double; | |
declare lon1 float; | |
declare lon2 float; | |
declare lat1 float; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELIMITER $$ | |
drop procedure if exists `user_search` $$ | |
create procedure user_search (in userid int, in min_age int, in max_age int, in gender char(1), in dist int, in lim int) | |
begin | |
declare mylon double; | |
declare mylat double; | |
declare lon1 float; | |
declare lon2 float; | |
declare lat1 float; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELIMITER $$ | |
drop procedure if exists `user_search` $$ | |
create procedure user_search (in userid int, in min_age int, in max_age int, in gender char(1), in dist int, in lim int) | |
begin | |
declare mylon double; | |
declare mylat double; | |
declare lon1 float; | |
declare lon2 float; | |
declare lat1 float; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELIMITER $$ | |
drop procedure if exists `user_search` $$ | |
create procedure user_search (in userid int, in min_age int, in max_age int, in gender char(1), in dist int, in lim int) | |
begin | |
declare mylon double; | |
declare mylat double; | |
declare lon1 float; | |
declare lon2 float; | |
declare lat1 float; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* example usage | |
$settings = array( | |
'user_id' => 1, | |
'min_age' => 20, | |
'max_age' => 40, | |
'gender' => 'F', | |
'distance' => 50, // in miles | |
'limit' => 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELIMITER $$ | |
drop procedure if exists `user_search` $$ | |
create procedure user_search (in userid int, in min_age int, in max_age int, in gender char(1), in dist int, in lim int) | |
BEGIN | |
declare mylon double; | |
declare mylat double; | |
declare lon1 float; | |
declare lon2 float; | |
declare lat1 float; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
core.register('myModule', function(sandbox){ | |
sandbox.subscribe('init', function(){ | |
//do stuff | |
}); | |
}); |