Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6900205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:31:02+00:00 2026-05-27T07:31:02+00:00

my showtime table contains following fields, id, name, showtime where id is a int

  • 0

my showtime table contains following fields,

id, name, showtime where id is a int type auto-increment field(pK). showtime time type unique field .

when I try to add a showtime(duplicate value) to showtime field($row->store()) it shows the following joomla error message.(I used $row->getError() method)

    TableShowTime: :store failed
    Duplicate entry '10:30:00' for key 'showtime' SQL=INSERT INTO `jos_myextension_showtime` (`id`,`name`) VALUES ('0','evening')

I want to know is there any way to show only the db error message without showing sql query.
I have an idea to check the duplicate values using a query before insert, is it a good practice? Plz Help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T07:31:03+00:00Added an answer on May 27, 2026 at 7:31 am

    I think that if you don’t want to display the query, then you shouldn’t show the other part of the error message neither (don’t tell the user you’re trying to insert a duplicate key). A simple fix to this might be something like this:

    if ( $row>getError() ) {
       echo "Could not store [...]";
    }
    

    If this is a custom component, you could also modify your table class to customize these error message, or even show distinct error messages depending on the error number.

    I hope it helped!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<table id=ratecardlist> <tr> <th> Show Time</th> <th> Balcony </th> <th> Box </th> <th> &nbsp;
Please look this link : (Jquery Time Picker Add-on) timepicker example ( Time picker
Please consider the following code, <form action=index.php method=post name=adminForm enctype=multipart/form-data> <input type=hidden name=showtime[] id=showtime_1
Suppose I have the following schema: Table: Showing showing_id movie_id theater_id show_date show_time Table:
I have a table which contains events for change the state of a maintenance
I using xaf and xpo for my app. I have TimeSpan field for time:
I'm giving a try on a open source time picker of jQuery library (
the code below works in Windows Phone 7 private void ShowTime() { txtTime.Text =
I don't know how to show Time in AM/PM format in blackberry using blackberry
This is my full code of month calender. It also show time on today's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.