Skip to main content
Filter by
Sorted by
Tagged with
587 votes
28 answers
961k views

I try to connect MySQL database with Java using connector 8.0.11. Everything seems to be OK, but I get this exception: Exception in thread "main" java.sql....
0 votes
1 answer
15k views

I am doing a 'JAVA project' in Eclipse Enterprise Edition IDE. Hibernate CRUD project to create user (student) details in my MySQL database (hibernatestudent). Hibernate version is Hibernate ORM core ...
2 votes
4 answers
54k views

I want to get the maximum id of row data. In my table first column is id then firstname and etc. this is the sql command I used to get the max(id) of row data. $maxid = $this->db->query("...
1 vote
3 answers
272 views

I want to echo the record that has the MAX() value in a specified column using CodeIgniter. How do I do that? I have table like this: id|value 1 | 3 2 | 1 What I've tried so far is to use query: ...
0 votes
2 answers
207 views

I need to fetch the highest value from a mysql db column. It's a timestamp. Using mysql MAX function it's not working, bellow you can see the code: //Create new db object $db = new Db(); //Query $...
7 votes
4 answers
28k views

see i m havving user.java for the user info. @Entity(name = "user") @Table(name = "user") public class User { @Id @Column(name = "id") private String id; @Column(name = "password") ...
0 votes
1 answer
172 views

I have three columns in my data set: The date when Item X was purchased The date when Item Y was purchased The date when Item Z was purchased Sample data: set.seed(100) Y <- sample(seq(as....
6 votes
6 answers
80k views

I'm trying to get a max value with CodeIgniter from an table but it isn't working. This is the error I get: Severity: 4096 Message: Object of class CI_DB_mysql_result could not be converted to string ...
3 votes
1 answer
9k views

Given the following client error message: Error: Can't connect to MySQL server on 'server' (60) What's the meaning of error code 60? MySQL v5.6 and v5.7 do not provide any info about it in docs, on ...
2 votes
1 answer
402 views

I have a python script that is currently connecting to my mysql database every 60 seconds, checking something, then closing the connection, so every minute I am doing this open/close of the connection....
Advice
0 votes
9 replies
141 views

I am designing a DB where basically parent can't exist without two children. E.g: Entity set Marriage, CAN'T exist without entity set Man and entity set Woman, but neither Man or Woman need Marriage ...
0 votes
3 answers
1k views

After running an update query in a Stored Routine: Update table1 set value='a' where id=1 if the table already has an identical row (with id=1 and value='a'), I'm getting the following message: 0 ...
Best practices
0 votes
7 replies
88 views

I have a PHP + MySQL project where I need to generate sequential transaction IDs. Each transaction can have multiple items, so all rows for that transaction must share the same txn_in value. Tables ...
0 votes
1 answer
455 views

We've got a Spring Hibernate, Apache Derby (Database) Java application running on Jetty server. Problem We've got 3 Apache Derby databases (DB1, DB2,DB3) that we need to migration in one MySQL ...
2 votes
1 answer
578 views

I want to make a multiple where query with AND and OR. Suppose my array is: array (size=8) 0 => array (size=2) 'timeline.type' => string 'videos' (length=6) ...
-2 votes
0 answers
67 views

Пароль я использую настоящий, тут я его просто скрыл. Объясните мне пожалуйста, что я сделал не так? Вот сам скрипт: import pymysql try: # Подключение к базе данных connection = pymysql....
1 vote
2 answers
1k views

Have an issue with MySQL ODBC Driver on Ubuntu 22.04 with Tableau Server. Attempting to connect result in error: [unixODBC][Driver Manager]Can't open lib '/usr/lib/x86_64-linux-gnu/odbc/libmyodbc8w.so'...
2 votes
2 answers
9k views

I got this error when try to connect Excel and MySQL using ODBC DataSource name not found and no default driver specified Here is my VBA code: Sub test123() ' Connection variables Dim conn As ...
2 votes
2 answers
721 views

I have 3 table - TB1, TB2 and r_tb1_tb2 (innoDB) TB1 Hold the details of the users (will be inserted) - id (primary, unique) - name TB2 Holds the details of the course the users can take (static ...
-1 votes
0 answers
33 views

I am fetching ProductTransfer table together with related products. Although the total records = 1200, am only getting three records returned by my api. Here is my models public class ...
1 vote
2 answers
2k views

I am creating new table from existing table using select query. The existing table column having data type varchar(255) so in newly created table that column contains varchar data type as default. ...
138 votes
12 answers
157k views

I'm attempting to copy my mysql database from an Amazon EC2 to an RDS: I successfully did a mysqldump of my database into my root folder using this: root@ip-xx-xx-xx-xx:~# mysqldump my_database -u ...
1 vote
3 answers
5k views

I keep getting the error below when adding an item to my cart. It just started showing up and I have more than enough memory left in the database. I have searched online to find a solution and I have ...
90 votes
15 answers
393k views

I have been trying to import Database through phpMyAdmin. My database file is a.sql and it's size is 1.2 GB I am trying to import this on local and phpMyAdmin is saying: You probably tried to ...
1 vote
1 answer
59 views

It's been a while since i used MySQLWorkbench to make queries and i'm kinda lost here. I want to update a row in a table named last_export that refers the last time a specific app had access to the ...
0 votes
1 answer
244 views

Can you help me I wanna update my table by using switch case in MYSQL id value_s ------------- 1 one 2 two 3 third 14 fourteen 24 twenty-two 34 thirty-four 11 eleven I wrote query but its ...
2 votes
3 answers
143 views

In the book Learning PHP, MySQL, JavaScript, CSS, and HTML5 – A Step-by-Step Guide to Creating Dynamic Websites (6th Edition), it says: “The highest level of MySQL structure is a database.” What does ...
Advice
1 vote
5 replies
160 views

So I'm uploading around 50MB into a longblob in a local mysql server. Using LoadFromStream, setting the param value is near-instantaneous but the execution of the UPDATE statement takes around 2 ...
4 votes
2 answers
966 views

I'm trying to insert data records into mysql database with mysql-python-connector. The Cursor API (https://dev.mysql.com/doc/connector-python/en/connector-python-api-mysqlcursor-execute.html) ...
60 votes
14 answers
126k views

I used the following python code and got this error. Print(e) = "cryptography is required for sha256_password or caching_sha2_password" And have no idea how to solve the error....
2 votes
1 answer
74 views

I'm trying to do a Join between three tables, in which in one table could not be informations to do the join. This my tables: Meetings id docent_id motivation Persons id name surname Companions ...
0 votes
2 answers
418 views

I have gone through many questions about joining 3 tables in Codeigniter, but I am stuck in these lines of coding that includes returning products array. function products_sorter($region) { $this-&...
3 votes
4 answers
2k views

I have three tables 1.article (id,article_title) 2.article_status(id,article_id,stage_id) 3.article_stages(id,stage_name) Each article have multiple insertion in table 2. I want to fetch the last ...
1 vote
2 answers
124 views

I am trying to select info from my database with CodeIgniter. Here is the code: public function getContent($table_name) { $show = false; $sql = 'SELECT * FROM ?'; $query = $this->db->...
0 votes
1 answer
56 views

I have a LEFT join query with an AND condition: SELECT a.s_id AS sid,a.s_prog_id AS progid,a.s_acssn_id AS ssnid,a.s_name AS sname,a.s_admission_no AS sadmsnno,a.s_photo_name AS sphotonm, b....
0 votes
1 answer
1k views

May be you have some idea how I can escape `$this->lang'. This is my actual query: $this->db->select('p.id, p.photo, p.desc, info.desc'); $this->db->from('products as p'); $this->db-&...
3 votes
2 answers
1k views

I'm having a problem with selecting data from my database. It show me following error A Database Error Occurred Error Number: 1054 Unknown column 'BA' in 'where clause' SELECT * FROM crime_details ...
0 votes
3 answers
97 views

I'm trying to join 3 tables from my database. database 1 : dkm (id, tgl, ref, etc) database 2 : order_product (kode_barang, packing, nama_barang, etc) database 3 : product (kodeprod, tglpakai, etc) ...
3 votes
3 answers
14k views

I have 3 tables in my database :- tbl_roles(role_id,role_name); tbl_users(id,role_id,username,email,password); tbl_tickets_replies(id,ticket_id,user_id,role_id,comments) role_id, id, id are primary ...
Best practices
1 vote
3 replies
73 views

I'm using a table of approximately 1TB in a MySQL database. This table also has a monthly partition. We store the last two months of data in this table and regularly truncate the data from the ...
1 vote
2 answers
9k views

I want to run a query in CodeIgniter. The query is SELECT * FROM td_album,td_image WHERE td_album.album_id=td_image.album_id AND td_album.album_id='$id' AND (td_image.image_name='$name' OR ...
1 vote
4 answers
1k views

My Xampp server is showing "MySQL shutdown unexpectedly". I did follow some solution to this problem but still it doesn't fix. All I have to do is every time I have to use MYSQL I uninstall ...
0 votes
2 answers
19k views

I have an MSSQL background. I am trying to create a function in MySQL Workbench by rightclicking on 'Functions' > 'Create Function'. I insert this text to create the function into the window but ...
-1 votes
2 answers
84 views

I'm writing a stored procedure and I encountered an issue with return records after insert. I know we can use row_count to know if the insert was successful or not. And my goal is: If it success, ...
1 vote
2 answers
781 views

I have read many articles, discussions and tutorials about using utf-8 charset in mysql. Several approaches are introduced apparently for different cases (e.g. transfering to utf-8). What are the ...
0 votes
1 answer
207 views

Thanks to a poster here at SO, I started using MySQLI and prepared statements. However, there is one issue I'm not sure how to adapt from the way I used MySQL. Before, I would open a connection to ...
2 votes
4 answers
1k views

I have three tables namely: tbl_users, tbl_account_details, and tbl_attendance.tbl_users looks like this user_id username role_id activated banned 1 admin ...
0 votes
1 answer
128 views

My table column contains following sample data: /Users/abct2/Library/Application Support/iPhone Simulator/4.3/Applications/FD301781-D39F-469E-A604-8164CC9A4493/Library/Caches/List3-ROHAN TEST1/...
14 votes
2 answers
12k views

I have a bunch of data that I want to insert, and I have decided to use bulk insert for MySQL. Insert into friends (requestor, buddy) values (value1, value2), (value2, value1), (value3, value4), (...
2 votes
1 answer
2k views

I have a table structure for user order into various shop like below. Now I want to get the query will be in codeigniter. Select list of shop_id belongs to the user_id Select the list of products ...

1
2 3 4 5
13178