hi guys, im a newbie to mysql and what im trying to do is...
i have two tables in the mysql database intranet, and the first table is called taskstat, and the second is todos
taskstat:
Code:
status_id status
1 open
2 closed
todos:
todo_id status_id
1 1
2 2
3 2
this is just a simplified version of the tables, it originaly contains lots of other information..
what i want to do is, have it so when i display the information about the "todos" table, when it reads the status_id from todo, it will display it as open or closed because it would find that info out from taskstat table..
currently we have this query:
<czdataset ittasks1 intranet todos query "select todo_id,item,description,status_id,creator_id,assi gned_id,date_created,date_fixed,first(select status from taskstat where taskstat.status_id=todos.status_id) as
status from todos where status_id = '1'" "todo_id,item,description,status_id,creator_id,ass igned_id,date_created,date_fixed" "*:*" >
so that when i put "status" as a field, it will display open or closed
however, with this i get the following error:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'select'.
/it/archtml.asp, line 493
i would really appreciate any help on this, thanks!