PHP Classes

File: api5/api5/textsql/app.logon.sql.php

Recommend this page to a friend!
  Classes of Santo Nuzzolillo   PHP AJAX REST API 5 Call   api5/api5/textsql/app.logon.sql.php   Download  
File: api5/api5/textsql/app.logon.sql.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP AJAX REST API 5 Call
Execute SQL queries and return JSON responses
Author: By
Last change:
Date: 6 years ago
Size: 434 bytes
 

Contents

Class file image Download
<?php
// Autentificando con un usuario LOCAL - Ejemplo MYSQL
/*
<sql type="QUERY" name="LOGIN">
SELECT user_id userid
, username username
, case when superuser = 1 then 'ADMIN' else 'USER' end roles
into :userid
  ,:username
  ,:roles
FROM users
where email = :email
and password = md5(:password)
</sql>
*/

/*
<sql type="QUERY" name="ROLES">
select role
from user_roles
where username = :username;
</sql>
*/