Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About snowymasta

  • Rank
  1. Thank you for your advise on this really appreciated, The session is being created at a login script I have and then passes that business ID through the pages.
  2. Hi Mac_gyver it shows this string(6) "300101" The DB structure is mig_bidvarchar(255)utf8_general_ciNoNone
  3. you mean like the below? mysqli_report(MYSQLI_REPORT_ERROR|MYSQLI_REPORT_STRICT); $conn = new mysqli($servername, $username, $password, $dbname) or die("Connect failed: %s\n". $conn -> error); $result = $conn->query("SELECT * FROM MK_migration_details WHERE mig_bid = '".$_SESSION['bid']."'");
  4. Ok that worked and it does exactly what it should, so assume that means the error is elsewhere! Whole Script below <?php require_once("db_connection.php"); $conn = new mysqli($servername, $username, $password, $dbname) or die("Connect failed: %s\n". $conn -> error); $result = $conn->query("SELECT * FROM MK_migration_details WHERE mig_bid='".$_SESSION['bid']."'"); $data = array(); while($row = $result->fetch_assoc()) { $data[] = $row; } echo json_encode($data); ?>
  5. Hi Guys, need a little help and drawn a blank. The code that is not working is below $result = $conn->query("SELECT * FROM MK_migration_details WHERE mig_bid='".$_SESSION['bid']."'"); I can confirm the $_SESSION['bid'] is working as echo's out on another part of the page. and the above $result works when i manually type the search criteria like below. $result = $conn->query("SELECT * FROM MK_migration_details WHERE mig_bid='300101'"); Basically no result turn up on the page. Any ideas or advise how I can diagnose?
  6. Hi Guys, Been trying to make it that when I insert into Mysql at the moment it inserts like dd-mm-yy, however cause I'm in the UK i need it to do it in the UK way of dd-mm-yy I checked out some topics and found the STR_DATE_DATE however I've tried to use it in my mysql but cannot get it to work. Can someone help $query="INSERT INTO job_scheduled (startdate, enddate, job_title, job_reference, job_description, job_postcode, job_city, customername, customer_email, status) VALUES ('".STR_TO_DATE($_SESSION["startdate"],'%d-%m-%y')."', '".$_SESSION["enddate"]."', '".$
  7. Hey Guys, I'm really struggling to find whats wrong with this code. The form before submit has several checkboxes as part of an array which is below <?php $conn = new mysqli($servername, $username, $password, $dbname); $sql = "SELECT * FROM `engineers`"; $result = $conn->query($sql); while($row = mysqli_fetch_assoc($result)) { $endid = $row["endid"]; $resource_name = $row["resource_name"]; $resource_email = $row["resource_email"]; $picture = $row["picture"]; echo "<label>".$resource_name."&l
  8. Hi guys, I'm starting to get back into coding for a hobby and wondering is there a better way of doing these php and mysql calls? they all work but not sure if it was the efficent way or is there others that everyone else uses? //connection for user details lookup $sql0 = "SELECT uid, fullname, emailaddress, created_at FROM MK_users WHERE uid={$_SESSION['id']}"; $result0 = $conn->query($sql0); //connection for user against role acceess $sql2 = "SELECT role_uid, role_bid, role_access, access_created_at FROM MK_role_access WHERE role_uid={$_SESSION['id']}"; $
  9. All sorted, when checking I saw that it was echoing out the addpostcode all on the same line, so added a breaker and put into the loop and working now!
  10. Hi Barand, Understand what your saying so what would you do? as the AddPostcode function is a javascript function?
  11. Hey Requinix, thank you for your reply, I thought that too but when I put it in it breaks and the map shows nothing at all. Is there a way I can trouble shoot that when I put it into the loop?
  12. Hi there, So the below code is working for 1 entry, however there is 2 entries in the database which are different postcodes and I cannot get to show in Google Maps. When I do it without Mysql and just do it direct it works, but really want to do it from MYSQL - both postcodes are valid and tested as well. <?php $sql4 = "SELECT * FROM MK_migration_details"; $result4 = $conn->query($sql4); ?> function initialize() { geocoder = new google.maps.Geocoder(); var latlng = new google.maps.LatLng(40.768505,-111.853244); var myOptions = { mapTypeCo
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.