Hello all, Im doing a website using PostgreSQL, first I've done a "control panel" that registers, edits and deletes items from my database, I cannot make anything else before I finish this, so Its like 80% from my project.
Im very confused, its my first time using PostgreSQL... I've read the manual and didn't find anything about the following problem:
First. I make a query that gets all the items. Everything is cool. If you want to edit one item you just choose it and edit it... It charges all the item's data, and when you click submit button it sends you to another page that registers all the schedule from the item.
Second. When you confirm all the data and the schedules, it tries to register it, it registers only the data in one table, but in other table it tries to register the schedules. With a for() I know how many schedules the user is registering. I delete all items schedules and register them again (the new ones).
There is when my problem comes, I get an error that I cannot understand:
Warning: PostgreSQL query failed: ERROR: attribute 'tr' not found in /web/webuser/pagina/villrob/_cursoscontrol/func_cursos.php on line 25
When I echo my query:
echo "INSERT into cursos values ($cursoid,$timecurso)";
it prints:
INSERT into cursos values (2
and stops there... It only happens when Im editing an item.
When Im registering one It succes perfectly and the curious thing is that both events use the same query to register the items schedules.
Does anyone can help me!?
Thanks since now.
Roberto Villarreal
Im very confused, its my first time using PostgreSQL... I've read the manual and didn't find anything about the following problem:
First. I make a query that gets all the items. Everything is cool. If you want to edit one item you just choose it and edit it... It charges all the item's data, and when you click submit button it sends you to another page that registers all the schedule from the item.
Second. When you confirm all the data and the schedules, it tries to register it, it registers only the data in one table, but in other table it tries to register the schedules. With a for() I know how many schedules the user is registering. I delete all items schedules and register them again (the new ones).
There is when my problem comes, I get an error that I cannot understand:
Warning: PostgreSQL query failed: ERROR: attribute 'tr' not found in /web/webuser/pagina/villrob/_cursoscontrol/func_cursos.php on line 25
When I echo my query:
echo "INSERT into cursos values ($cursoid,$timecurso)";
it prints:
INSERT into cursos values (2
and stops there... It only happens when Im editing an item.
When Im registering one It succes perfectly and the curious thing is that both events use the same query to register the items schedules.
Does anyone can help me!?
Thanks since now.
Roberto Villarreal