Member
Member
Dynamics99   2021-09-13, 14:58
#1

Im trying to access the .albums table in MYSQL and when I say select * from albums;

It says table zenphoto.albums doesn't exist.

Administrator
Administrator
acrylian   2021-09-13, 15:44
#2

You probably didn't look at your tables and missed the table prefix:

Use Zenphoto's own functions for this like this:

query_full_array("SELECT * FROM " . prefix('albums'));

Depending on what you are trying to do, consider to use the object model instead to get data as there is some more context to things that you can achieve with direct queries.

Member
Member
Dynamics99   2021-09-13, 15:55
#3

I did look at the table prefix but it wouldnt help? The command SELECT * FROM .albums; would throw a syntax error. I looked into query_full_array in the docs and it was deleted?

Administrator
Administrator
acrylian   2021-09-13, 16:27
#4

Please post the full command you are using and escape it properly using backticks here in the forum. Otherwise your code will be truncated and unreadable like I assume SELECT * FROM .albums; above was (as that certainly would throw an error).

I looked into query_full_array in the docs and it was deleted?

No, it is not deleted. What you probably saw: Our doc generator cannot handle that we have a lot procedural functions with the same name in different function files. That generator does (and how should it) understand that only one is loaded at the time (depending on what db handler you are using) so this is not an issue and includes just one of them.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.