Categories > TinyButStrong general >

joomla 1.6 - Access denied for user ''@'localhost'

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: JB
Date: 2011-03-07
Time: 22:34

joomla 1.6 - Access denied for user ''@'localhost'

I´m trying to reproduce external script example Type #2 in joomla 1.6.

In my article i put:
{tbs}script=cuentas.php; {/tbs}

Name                        Email
[u.name;block=tr]  [u.email]


and generate the script cuentas.php:
<?php
$key =  JFactory::getUser();
$key = $key-> get('id');

$TBS->MergeBlock('u','mysql','SELECT name, email FROM jos_users WHERE id='.$key);
?

But when i access the article i got the error message:
"TinyButStrong Error when merging block [u]: MySql error message when opening the query: Access denied for user ''@'localhost' (using password: NO)"

How may i correct the error ??

Someone may help me....

Thanks in advance


By: Skrol29
Date: 2011-03-08
Time: 00:10

Re: joomla 1.6 - Access denied for user ''@'localhost'

Hi JB,

Try by replacing 'mysql' with 'mysqli'.

By: JB
Date: 2011-03-08
Time: 01:10

Re: joomla 1.6 - Access denied for user ''@'localhost'

Thank you Skrol29. It didnt work. It produces the following error messge:
TinyButStrong functions for MySQLi: . SQL Source : {SELECT name, email FROM jos_users WHERE id=43}

TinyButStrong Error when merging block [u]: function tbsdb_mysqli_open() has failed to open query {SELECT name, email FROM jos_users WHERE id=43}

But I remembered that in the set up (Global Configuration, server, Databasetype) I changed MySQL by MySQLi. I Reverse the chage (to MySQL) ánd all it is working fine.

Thanks again.

JB