Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(E_ALL);
- //DB CONNECT INFO
- $dbuser="root";
- $dbpass="root";
- $dbname="reservoir_migrate";
- $chandle = mysql_connect("localhost", $dbuser, $dbpass)
- or die("Connection Failure to Database");
- mysql_select_db($dbname, $chandle) or die ($dbname . " Database not found. " . $dbuser);
- //DISPLAY FUNCTION
- function a()
- {
- echo 'foo';
- }
- /*
- function idata() {
- $sqli = "INSERT INTO f1_people (
- household_id,
- individual_id,
- position,
- prefix,
- last_name,
- first_name,
- suffix,
- middle_name,
- status_group,
- status,
- sub_status,
- gender,
- marital_status,
- occupation,
- employer
- )
- VALUES (
- '$household_id',
- '$i',
- '$position',
- '$prefix',
- '$last_name',
- '$first_name',
- '$suffix',
- '$middle_name',
- '$status_group',
- '$status',
- '$sub_status',
- '$gender',
- '$marital_status',
- '$occupation',
- '$employer'
- )";
- echo $i;
- $resulti = mysql_query($sqli) or die (mysql_error());
- $i=i ;
- };
- */
- $sql = "select * from contacts";
- $result = mysql_query($sql) or die (mysql_error());
- while($row = mysql_fetch_assoc($result)){
- $household_id = $row['id'];
- $prefix = $row['prefix'];
- $first_name = $row['first_name'];
- $last_name = $row['last_name'];
- $middle_name = $row['middle_name'];
- $suffix = $row['suffix'];
- $goes_by = $row['nickname'];
- $spouse_first_name = $row['spouse_first_name'];
- $occupation = $row['title'];
- $employer = $row['organization'];
- /*
- if($spouse_first_name != ""){
- $first_name = $spouse_first_name;
- $prefix = "";
- $middle_name = "";
- $suffix = "";
- $goes_by = "";
- $occupation = "";
- $employer = "";
- }
- */
- a();
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement