How to check two tables in php [duplicate]

43
December 26, 2018, at 4:40 PM

This question already has an answer here:

  • How to check if a given data exists in multiple tables (all of which has the same column)? 7 answers
  • check if row exists with mysql 3 answers

Im setting up a sign-up form, and want to implement two checks.

In my sql database, ive got 2 tables that I would like to run through, one named "users" and the other named "Stokens".

Currently, ive created this (code below) to check the table named "users" if a username is already taken however, i'd also like to check the other table named "Stokens" to see if the given key ($key) exists in the other table.

mysqli_stmt_bind_param($stmt, "s", $username);
mysqli_stmt_execute($stmt);
mysqli_stmt_store_result($stmt);
$resultCheck = mysqli_stmt_num_rows($stmt);
if($resultCheck > 0) {
    header("Location: ../signup.php?error=userTaken");
    exit();
}

Edit: Question is how do i check if variable $key exists in table "Stokens" and at the same time check if variable $username exists in table "users"

READ ALSO
catenate|| and %

catenate|| and %

I have a simple sql:

64
How to integrate an object detection model made in tensorflow with android app?

How to integrate an object detection model made in tensorflow with android app?

I am currently retraining one of tensorflow’s neural net models for object detectionI was wondering how to actually use this model within the Android app so that I can get live frames or images from the camera that can be processed by the model

92
Building APK with AOSP

Building APK with AOSP

Using AOSP we can build own Android with some features

108
Using TypefaceSpan

Using TypefaceSpan

I'm trying to make work TypefaceSpan TypefaceSpan on developerandroid

86