Categories > TinyButStrong general >

Displaying sql errors

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Alex
Date: 2006-09-20
Time: 17:02

Displaying sql errors


Hello all,

sorry for by bad english...

I'm using Tiny But String for two days and I think that's an excellent way to reduce the developpment time. Thanks to the developpers.

Nevertheless, I have a question : I'm using another tool to maintain sql queries and I cannot see the sql errors. Is there an option to display them ?

Thanks
By: Skrol29
Date: 2006-09-20
Time: 21:05

Re: Displaying sql errors

Hello,

If you are using a Database TBS plug-in for this tools, then you have to trap  and display the error messages from this plug-in. Otherwise your tool has to display the SQL errors.
By: brad
Date: 2006-09-21
Time: 23:40

Re: Displaying sql errors

hi,

I'm new to all this, have got the mysql example running ok, but am wondering how to handle errors that occur when querying a database. Especially in the case where users are entering search terms that may cause problems.

It would appear that using: $TBS->MergeBlock('blk1',$cnx_id,'SELECT * FROM t_tbs_exemples') ; does not allow for any error handling. I just get an error on the page and the rest of the template is not rendered. This is not ideal for a finished application.

From looking at other people's examples they are using: $sql = mysql_query(SELECT...) OR DIE ('Error msg') instead. Is this a better way of dealing with errors?

Using DIE() I get a blank web page with the error message on it. Can I redirect to an error page instead that inclucdes the look and feel of my application? I want something that looks more professional.

Cheers