Results 1 to 2 of 2

Thread: I can not display data

  1. #1
    Join Date
    Jan 2017

    I can not display data

    Hello to everyone!! and forgive me because I am still new to PHP development.
    My issue is:

    I have 2 tables, cover and lamination which have almost the same structure. So I tried to select the id's from both tables and then make some compare with if statement.
    PHP Code:
    $get_lamination $mysqli->query("SELECT a.id , b.id FROM $table_lamination a , $table_cover b ");
    $row =  mysqli_fetch_array($get_lamination)) {
    "the cover id is"$row['b.id'] . "id"
    But the thing is that I can't display the cover id with the code you see.
    Please guide me.
    Thank you again so much!

  2. #2
    Join Date
    May 2016
    Southern California
    Since you're selecting id's from both tables, give the id fields an alias like:
    "SELECT a.id as lam_id, b.id as cover_id FROM $table_lamination a , $table_cover b "
    then access the data with $row['lam_id'] and $row['cover_id'];

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center