PHP Classes

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

Recommend this page to a friend!
  Classes of Santo Nuzzolillo   API SQL to JSON   api5/textsql/app.logon.sql.php   Download  
File: api5/textsql/app.logon.sql.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: API SQL to JSON
Send AJAX requests and responding with JSON data
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>
*/