I was so happy when I found phpfriendly. It was just
what I was looking for. I have made a few database-
driven websites for a client and I want to give him some
control over the data without overwhelming him with
something like phpmyadmin.
BUT...
I have had a lot of trouble getting phpfriendly to work
properly. When I first installed it a month ago, I thought
I got everything working smoothly. So I was baffled
when I tried to set things up today and started
getting "Syntax errors". So after about an hour I figured
out that you need at least one field in addition to a
primary key to browse a table or else there is a hanging
GROUP BY clause in the SQL. (Suggestion: include the
SQL in your error messages.)
But then I got another problem when I tried to edit
individual values in my table. I got the error message:
"DB Error: no such table:
...with the SQL: SELECT * FROM table1 WHERE test = '2'.
Now I know that the SQL is valid because it returns a
result when I run it directly into my database. So I'm
thinking that the table is not set up properly in
phpfriendly. But I tried every option over the course of a
few hours with no success. That's why I'm writing this
now!
Please help. I want to like phpfriendly but so far it's only
given me frustration.
Greg
gregdingle@yahoo.com
PS: Where is the function getMessage()? I couldn't find
it defined in any of the files, and it's not some kind of
built-in function is it?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I was so happy when I found phpfriendly. It was just
what I was looking for. I have made a few database-
driven websites for a client and I want to give him some
control over the data without overwhelming him with
something like phpmyadmin.
BUT...
I have had a lot of trouble getting phpfriendly to work
properly. When I first installed it a month ago, I thought
I got everything working smoothly. So I was baffled
when I tried to set things up today and started
getting "Syntax errors". So after about an hour I figured
out that you need at least one field in addition to a
primary key to browse a table or else there is a hanging
GROUP BY clause in the SQL. (Suggestion: include the
SQL in your error messages.)
But then I got another problem when I tried to edit
individual values in my table. I got the error message:
"DB Error: no such table:
...with the SQL: SELECT * FROM table1 WHERE test = '2'.
Now I know that the SQL is valid because it returns a
result when I run it directly into my database. So I'm
thinking that the table is not set up properly in
phpfriendly. But I tried every option over the course of a
few hours with no success. That's why I'm writing this
now!
Please help. I want to like phpfriendly but so far it's only
given me frustration.
Greg
gregdingle@yahoo.com
PS: Where is the function getMessage()? I couldn't find
it defined in any of the files, and it's not some kind of
built-in function is it?
In your main_classes/User.php try to find this SQL statement:
$sql = "SELECT * FROM " . $currenttable->dbtablename . " WHERE " . $currenttable->findid() . " = '" . $primarykey . "'";
and change the single code line below that into this:
$regdb = $currenttable->database->constring();
$result = $regdb->query($sql);
Your problems will be solved!