Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#13 2008-08-14 23:29:14
- cgradio
- New Member
- Registered: 2008-08-14
- Posts: 6
Re: connect to separate database
The errors I’m receiving:
Tag error: <txp:author/> -> Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user ‘gadlage’@‘localhost’ (using password: NO) on line 11
Tag error: <txp:author/> -> Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established on line 11
Tag error: <txp:author/> -> Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user ‘gadlage’@‘localhost’ (using password: NO) on line 11
Tag error: <txp:author/> -> Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established on line 11
Tag error: <txp:author/> -> Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user ‘gadlage’@‘localhost’ (using password: NO) on line 11
Tag error: <txp:author/> -> Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established on line 11
Tag error: <txp:author/> -> Textpattern Warning: Access denied for user ‘gadlage’@‘localhost’ (using password: NO)
select RealName from homesitetxp_users where `` = ‘’ limit 1 on line 81
Offline
Re: connect to separate database
Can’t you put all tables (TXP and your own) in one database?
Offline
#15 2008-08-15 11:37:44
- cgradio
- New Member
- Registered: 2008-08-14
- Posts: 6
Re: connect to separate database
I attempted that as well. I even named the music table with the same nomenclature as the other txp tables. Calling appears to be the issue. Unless I could call it with a txp function rather than re-inserting all of the username/etc. I have had several versions of results, but the errors at the top are consistent with every iteration.
If the table were in the same database as txp, how should I call it?
Last edited by cgradio (2008-08-15 11:38:18)
Offline
Re: connect to separate database
You can use the database functions in /textpattern/lib/txplib_db.php
Offline
#17 2008-08-15 22:46:45
- cgradio
- New Member
- Registered: 2008-08-14
- Posts: 6
Re: connect to separate database
I see that txplib_db.php holds the calling of the database. If I place my table in the same database, how would I call the table and display its results in a txp article or form (preferable). I didn’t see txplib_db defining any textile functions to call a table’s elements. I just don’t want to re-invent the wheel since my “re-invention” couldn’t get rid of the error message.
Since txp should already be logging into the database, I should only have to call the table, right?
Thanks for your time,
Chris
Offline
#18 2008-08-15 23:03:54
- cgradio
- New Member
- Registered: 2008-08-14
- Posts: 6
Re: connect to separate database
I figured it out! At the end of the form, I was closing the connection, so of course txp was having issues trying to access anything below the form in the default page setup, ‘cuz some dough head closed the connection! [That would be me.]
Thank you, Ruud for all of your help. You rock!
Chris
Offline