I found a not so nice method for checking if there a row already exists, and if it does exists, then it doesn’t add it to avoid duplicates. Am i completely crazy to rely on this method or should i go old fashioned way where i check if it exists BEFORE trying to insert row ..
Category : mysql

I have a strange problem that im working on for more than 8 hours now. When I connect to MySQL database in PHP and trying to get data from a specific database I only get results with ID less than 27690 (probably) or where the creation years are earlier than 2019. My code: mysqli_report(MYSQLI_REPORT_ERROR | ..
I’m trying to retrieve data from a database. I need to get multiple fields from the same row. I’m using a key to retrieve data from a single row but I get the following error: org.json.JSONException: Value All of type java.lang.String cannot be converted to JSONObject Here is the code: try { JSONObject jsonObject = ..
I have one doubt in mysql select statement, I tried so many ways i did not get result, Can any one please help on this query. My select statement is here (SELECT document_attachment_id FROM Customer_document_relationship WHERE siteid=cs.SITE_ID LIMIT 1) AS document_attachment_id, (SELECT GROUP_CONCAT(document_name) FROM document_type_relationship WHERE document_id IN(REPLACE(document_attachment_id,"’",”)) LIMIT 1) AS billbasedOn Here document_attachment_id result ..

I have an application that should caculate an HRV stress base on calendar event making which should be base on that picture 15.4 user input thier dairy and then goes to answer the query ( Vasta kyselyihin) button, should be in the second picture where user answers the questions which is an form but the ..
I have a standard code to search by column and am now trying to add the option of searching multiple criteria in one column. Currently I can search by one criteria, so if the user selects location QLD it will display all QLD entries, what changes do i need to make to enable the user ..
I have a laravel application in a shared hosting and have database. I have to get data from localhost xampp db. how can I get it? I added local db details to config/database.php. But it is showing error "SQLSTATE[HY000] [2002] An attempt was made to access a socket in a way forbidden by its access". ..
check for duplicate "username" field case : if user wants to update record other than username field (like firstname or whatever) and i used simple select query to check for duplicate like "SELECT * from user where username = $username" and check count than it will return count 1 because user name already exist (in ..
enter image description here Getting this error while entering username and password which is stored in my sql in php myadmin db. I’m not getting this error in my php Myadmin Mysql page as the sql syntax is running properly there.Only in my Spyder Ide I’m getting this error. Source: ..
I’m trying to retrieve data from a database. It uses a php file as well as another Java class ie. Config.java. I’m using an id which is retrieved from a previous activity using a function. The database table is called students and uses the primary key ‘username’. Here’s the code for my Java class editdata: ..