Re: [PHP-DB] Correct Syntax?

2015-10-13 Thread Roberto Spadim
instead of +, use ",'

2015-10-13 20:21 GMT-03:00 Karl DeSaulniers <k...@designdrumm.com>:

> Quick question. Is this viable in MySQL?
>
> UNIQUE KEY `Vehicle_Name`
> (`Vehicle_Make`+`Vehicle_Model`+`Vehicle_Style`+`Vehicle_License`)
>
> TIA
>
> Best,
>
> Karl DeSaulniers
> Design Drumm
> http://designdrumm.com
>
>
>
>


-- 
Roberto Spadim
SPAEmpresarial - Software ERP
Eng. Automação e Controle


Re: [PHP-DB] MariaDB Database / Table Structure

2014-11-04 Thread Roberto Spadim
with mariadb/mysql:

2014-11-05 4:20 GMT-02:00 Ron Piggott ron.pigg...@actsministries.org:


 Hi Everyone.

 I am wondering if there are database queries that would


SHOW DATABASES; - return all databases



 a: produce the result of all the tables with a database *

SHOW TABLES FROM `database_name`;
or
USE `database_name`;
SHOW TABLES;
or
use infomration schema:
*SELECT * FROM information_schema.TABLES*
or
*SELECT TABLE_SCHEMA,TABLE_NAME FROM information_schema.TABLES*
or
*SELECT DISTINCT TABLE_SCHEMA,TABLE_NAME FROM information_schema.COLUMNS*



 b: produce the result of all the columns with the specified database table
 *

SELECT * FROM `database_name`.`table_name` LIMIT 0?  (and fetch fields
names via php functions of result set)
or
SHOW FIELDS FROM `database_name`.`table_name`;
or
*SELECT * FROM information_schema.COLUMNS WHERE
TABLE_SCHEMA=database_name AND TABLE_NAME=table_name; (and interact as
a result set)*



 * I don't want any other details than these names.

 I am trying to build a WHILE loop that in pseudo code will look roughly
 like

 - query to get a list of all the tables within a database
 - start of a foreach loop (going one table at a time

- query to get all the column names within the table
- start of a foreach loop to display column names
- display column name
- end of foreach loop

 -end of foreach loop

 Ron

this sounds like a table structure dump to execute a diff, i'm right?


-- 
Roberto Spadim
SPAEmpresarial
Eng. Automação e Controle


[PHP-DB] mysql and auth plugins

2014-10-21 Thread Roberto Spadim
Hi guys, i'm with a doubt about mysql and connect with a mariadb
server using a dialog auth plugin (server side)

i didn't found functions to execute dialog with server

a full example of what i want but using heidisql can be found here:
http://www.heidisql.com/forum.php?t=9752

any help is wellcome

-- 
Roberto Spadim

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: mysql and auth plugins

2014-10-21 Thread Roberto Spadim
here the php files (download only .php files):
https://github.com/rspadim/server/blob/otp_plugin/plugin/auth_otp/
here the today output using mysql_connect: (using otp_auth_example.php php file)

==
MYSQL_CONNECT:

PHP Warning:  mysql_connect(): The server requested authentication
method unknown to the client [dialog] in
C:\GIT\mariadb-tmp\server\plugin\auth_otp\otp_auth_e
xample.php on line 50

Warning: mysql_connect(): The server requested authentication method
unknown to the client [dialog] in
C:\GIT\mariadb-tmp\server\plugin\auth_otp\otp_auth_exampl
e.php on line 50
PHP Warning:  mysql_connect(): The server requested authentication
method umknown to the client in
C:\GIT\mariadb-tmp\server\plugin\auth_otp\otp_auth_example.ph
p on line 50

Warning: mysql_connect(): The server requested authentication method
umknown to the client in
C:\GIT\mariadb-tmp\server\plugin\auth_otp\otp_auth_example.php on
line 50
Error: The server requested authentication method umknown to the
client   (CHECK A TYPO ERROR)


==
MYSQI_CONNECT:
C:\GIT\mariadb-tmp\server\plugin\auth_otpphp otp_auth_example.php
PHP Warning:  mysqli_connect(): The server requested authentication
method unknown to the client [dialog] in
C:\GIT\mariadb-tmp\server\plugin\auth_otp\otp_auth_
example.php on line 60

Warning: mysqli_connect(): The server requested authentication method
unknown to the client [dialog] in
C:\GIT\mariadb-tmp\server\plugin\auth_otp\otp_auth_examp
le.php on line 60
PHP Warning:  mysqli_connect(): (HY000/2054): The server requested
authentication method umknown to the client in
C:\GIT\mariadb-tmp\server\plugin\auth_otp\otp_
auth_example.php on line 60

Warning: mysqli_connect(): (HY000/2054): The server requested
authentication method umknown to the client in
C:\GIT\mariadb-tmp\server\plugin\auth_otp\otp_auth_
example.php on line 60
PHP Warning:  mysqli_error() expects parameter 1 to be mysqli, boolean
given in C:\GIT\mariadb-tmp\server\plugin\auth_otp\otp_auth_example.php
on line 62

Warning: mysqli_error() expects parameter 1 to be mysqli, boolean
given in C:\GIT\mariadb-tmp\server\plugin\auth_otp\otp_auth_example.php
on line 62
Error:




===
PDO:

C:\GIT\mariadb-tmp\server\plugin\auth_otpphp otp_auth_example.php
PHP Warning:  PDO::__construct(): The server requested authentication
method unknown to the client [dialog] in
C:\GIT\mariadb-tmp\server\plugin\auth_otp\otp_aut
h_example.php on line 68

Warning: PDO::__construct(): The server requested authentication
method unknown to the client [dialog] in
C:\GIT\mariadb-tmp\server\plugin\auth_otp\otp_auth_exa
mple.php on line 68
Error: SQLSTATE[HY000] [2054] The server requested authentication
method umknown to the client

2014-10-22 1:44 GMT-02:00 Roberto Spadim robe...@spadim.com.br:
 Hi guys, i'm with a doubt about mysql and connect with a mariadb
 server using a dialog auth plugin (server side)

 i didn't found functions to execute dialog with server

 a full example of what i want but using heidisql can be found here:
 http://www.heidisql.com/forum.php?t=9752

 any help is wellcome

 --
 Roberto Spadim



-- 
Roberto Spadim
SPAEmpresarial
Eng. Automação e Controle

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php