Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- header('Content-type: text/html; charset=utf-8');
- $db_host="";
- $db_user="";
- $db_password="";
- $db_name = "";
- $mysqli = new mysqli($db_host, $db_user, $db_password, $db_name);
- if (mysqli_connect_errno()) {
- printf("Ошибка соединения: %sn", mysqli_connect_error());
- exit; }
- $mysqli->set_charset("utf8");
- if ($stmt = $mysqli->query('SELECT * FROM vtiger_contactdetails, vtiger_timesheet, vtiger_timesheetcf WHERE vtiger_contactdetails.contactid = vtiger_timesheet.cf_2295 AND vtiger_timesheet.cf_2295 = vtiger_timesheet.timesheetid')) {
- while($row = $stmt->fetch_assoc()){
- echo $row['lastname'].' '.$row['cf_2295'].'<br />';
- }
- }
- ?>
- SELECT * FROM vtiger_contactdetails
- JOIN vtiger_timesheet
- ON vtiger_contactdetails.contactid = vtiger_timesheet.cf_2295
- JOIN vtiger_timesheetcf
- ON vtiger_timesheet.cf_2295 = vtiger_timesheet.timesheetid
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement