Search the Community
Showing results for tags 'mysql'.
-
i have a form called screen1 which is the first form.it has a text field called username_TextField. i want to take the user input from this textfield and use it for a sql statement in my second form.the code below is the one i have written but it gives me a error saying: Non-static variable username_TextField cannot be referenced from a static context. what could be the problem.please help. String username = screen1.username_TextField.getText();
-
i need to get the current date and insert it to a table in the database in mysql using a insert query along with some other data such as Id and name.any suggestions how to get this done will be very helpful.Thanks
-
i have a variable called sal and i want to assign it's value to a field called salary in my mysql databse. when i execute the code below it updates the salary as the world sal and not its value.how can i update the record with its value.please help. sal=sal+new_amount; String pay ="UPDATE employees Set salary = sal where EMP_No='"+empno+"'";
-
Hi, so I need a script that "select uid from user where team=somename". In this database there are 3 users, uid - jack, team - hello. uid - river, team - hello. uid - alex, team - no. so when it runs the select to get all the usernames that has team hello in it I want it to return a number, in this case "2". How can this be done?
-
So ... i was converting my Windows Server in to Linux and i backed up EVERYTHING .... except MySQL, i remembered this after i installed Ubuntu so the files did not get overwrote during the switch. I was able to recover the whole `C:\ProgramData\MySQL\MySQL Server 8.0` directory and files inside. One problem ... i cant just copy that backup over to new MySQL install (i installed MySQL on my Main PC with Windows 10 just to test it and convert everything in to .sql files and back them up) If i try to do that with the files that actually need to be copied (ibdata, ib_logfileX...) MySQL wont start... Is there any way to recover the InnoDB databases and tables with ibd files or what can i do to recover it in some other way? I was searching around and everything that i found required some .frm file which i couldnt find anywhere, im guessing MySQL 8 doesnt use them anymore? Imma add some pics of files that i have in to attachments And inside the Data folder: The most important Database from there is that `admin_tracker`, i need to recover that, other stuff is not really needed .... Files inside that `admin_tracker` folder: Thank you for any help!
-
ok, so here is the back story, my dad is starting up a company, he is going to create a website and a email, he already has his domain name. The company will buy equipment which will be loaned to mining areas in Rural Australia. Would it be beatifically to setup a MySQL server to get information from databases (like mining trends/info, etc) to see when new equipment is needed to be bought so that what he can maximise profit? Do you need to have a website with MySQL built in? Can i host my own MySQL server at home and what system specs will i need? Thanks
-
Hello! I have been working on a project recently involving storing large amounts of data into a MySQL database. Usually, I run my projects on an old computer, but it seems to not be able to handle the database and the code at the same time anymore so I've been thinking about investing in a server focused only on the database side of things. As I am a student, I need to keep to cost down as much as possible, what would be your recommendation? I've looked at several refurbished servers, but I have no idea what to be looking out for. I'm from the UK, so I'm looking at the UK and EU stores. What parts should I focus on? Which brands are preferred as well as which CPU and how much ram would you recommend? Thank you for your help!
-
Hi all, I am trying to connect to my cpanel MySQL Database by C# but doesn't seem to work at all.. I have looked up multiple topics and videos but all the code is very similar or does not work. Below you can see the code I am using, I marked out the key bits as they belong to my server. When I run this code the following message appears after about 15-30 seconds. I have added my home IP to the access list and everything but still no joy on getting connected.. However I can access via MySQL Workbench but I am using Standard TCP/IP over SSH method. Hopefully someone out there can help me. Thanks in advance! -Scott
-
I am working on a project that is based of the the Huge PHP login Framework on Github. I am Working on adding in the other database tables for the users and I want to make it so I can see the data in the table on the admin page. The Admin index page has this implemented for the current table but I have created a page that is for the rest of less accessed information that an admin does not need to look at on a regular basis. I copy and pasted the getPublicProfilesOfAllUsers() from the UserModel.php and added it right below along with the changes to the code that I saw as necessary. Then I mapped the function and values on the admin controller page. I also created a basic html page that was based of the admin page that showed normal user information and I removed the code that I felt was not necessary. I know I have data in my Mysql Database in the table so I really don't know why its not being passed through to the html page. I have tried setting default values on the model page and still I get no information passed through to the webpage I don't know that I did wrong and it would be a big help if I could get some pointers. UserModel.php index.php private.php AdminController.php
- 3 replies
-
- php
- huge framework
- (and 4 more)
-
Hello dear tech community I'm seeking some light on my SQL I have been tasked to create a procedure for my database, I have been provided with code I have to fill in, put it make no sense because every tutorial I have looked at is completely different. DELIMITER $$ CREATE PROCEDURE course_scheduler (IN new_code CHAR(3), IN start_date DATE) BEGIN DECLARE isExisting BOOLEAN DEFAULT FALSE; DECLARE new_code CHAR(3); DECLARE start_date CURSOR FOR SELECT course_code FROM module WHERE new_code = course_code; DECLARE CONTINUE HANDLER FOR NOT FOUND SET isExisting = TRUE; -- NOTE : check if course exists ! IF (isExisting) THEN SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = ' Course exists'; END IF; -- NOTE : check if start date is >= month in future ! IF (start_date) THEN SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = ' Course starts'; END IF; OPEN todo; todo: LOOP FETCH NEXT FROM todo INTO todo; IF (todo) THEN LEAVE todo; END IF; -- NOTE : Check Saturday / Sunday & Skip using WEEKDAY & DATE_ADD functions respectivly in MySQL . . Google ! INSERT INTO `session` (`code`, `date`, room) SET start_date = DATE_ADD(CURRENT_DATE, INTERVAL 1 MONTH); END LOOP; CLOSE todo; END$$ DELIMITER ; the word "todo" needs to be replaced with the appropriate variable from the database, but am just not getting it. https://imgur.com/a/1QZYdUi : database Can't add the screenshot of the databse for some reason. *Fells Stupid* Any help is much apreaciated EDIT: o Produce a procedure that assigns a new schedule for a given course. The procedure should accept a course code & start date as arguments then schedule each of the given course’s modules on consecutive (working / week) days. The start date must be at least a month in the future otherwise, a suitable error should be raised. o Tips . . CURSOR, LOOP, SIGNAL
-
Hello again I have run into a problem with this satement: SELECT result.project_id, result.seconds_elapsed_issue FROM ( SELECT iss.project_id, inter.issue_id, SUM(seconds_elapsed) AS seconds_elapsed_issue FROM intervals inter LEFT JOIN issues iss ON iss.issue_id = inter.issue_id WHERE dt_start BETWEEN "2018-01-01T00:00:00Z" AND "2018-10-05T23:59:59Z" GROUP BY inter.issue_id ) AS result GROUP BY project_id; I get the error: [42000][1055] Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'result.seconds_elapsed_issue' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by. can anyone explain what's going wrong here?
-
(We use C#) We are making an app which tracks your jobs from Euro Truck Simulator 2. Currently, we have our database setup and how we are tracking our jobs. How we intended to save them was in this format for example (All in 1 long string) : [J]source/destination/distance/income[J]source/destination..... etc , you get the point ... So that we can use string.Split("[J]") and get all of the jobs, and then string.Split('/') got split each job in to its data. But the problem is , as far as i understand , types like Varchar , Text, LongText (or whatever they are called) have a maximum data limit.... right ? So if someone has a ton of jobs, he will eventually reach that limit...... that is bad ...... How can we avoid this data limit ?
- 9 replies
-
- mysql
- data limit
-
(and 1 more)
Tagged with:
-
Hello, I'm looking to understand how reliable are SSD, with write heavy database operations. I understand that usually they fail suddenly and without warning, taking down the entire system. I have considered RAID, but SSD+HDD logically does not make sense since speed will be slower of the two RAID 1(SSD+SSD) is also out of the picture, since both drives will fail at the same time. I do not want more than two SSD drives, since cost will be significantly higher(I'm planning to buy HP enterprise SSD) What are my options, in such a case? How do I ensure reliability of the database? Thanks!
-
Hey guys, I want some educational advice over whether I should choose Python or MySQL and PHP as my specialization in the course I'm doing next year. The reason why I'm asking is because out of the 2 main tracks that are offered in the course (Web Dev or Software/Mobile Dev), I'm going with Web Dev and I'm unsure as to which specialization would help me more and be more worthwhile for doing web development in future? Thanks in advance for the advice! Regards A confused final year high school student Link for referencing (hope the link works): https://www.aie.ac/tcp-2_30_374-it-systems-developer-nqf5-computer-programmer.html
- 11 replies
-
Hola! I'm currently making a Python Tkinter app as a personal project, however I've hit a road block. The program inputs an entry into MySQL query which then spits out the result as a Label. You enter a name and it prints out: "ID name email". So it works great, but I need those values as separate variables. I could just access the data with 3 SQL queries but thats just awful. What I need is some kind of a string function that will use the result variable and create three variables or better, a list with [ID,name,email]. I appreciate all input. I didn't include the source code because it doesn't really matter here. A general solution or a point in the right direction will be more beneficial for me, as I will be able to learn and adapt it for my needs.
-
hey guys :) I'm trying to install wordpress on linux to learn. I installed wordpress, mysql, apache, tried to link apache with mysql server. But the linkage never worked. The apache server is not able to establish a connection with the database.Tried different linux dis. . Tried many tuts, still getting error after error. Bad luck is now so bad that mysql showed my correct password incorrect on ubuntu, but that was solved on linux mint. Do anyone knows any guide to install wordpress with minimum errors?
-
My Remote user: 192.168.0.112 (windows, PHP with mysqli) My Mysql Server (ubuntu 20.04 lts) 192.168.0.105\ My Commands i have run so far: CREATE DATABASE web_search; USE web_search; CREATE TABLE IF NOT EXISTS `web_info` ( `id` int(11) NOT NULL, `meta_title` varchar(100) NOT NULL, `meta_description` varchar(300) NOT NULL, `site_url` varchar(300) NOT NULL, `platform` varchar(300) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=199 DEFAULT CHARSET=latin1; CREATE USER 'remote4'@'192.168.0.112' IDENTIFIED BY 'mypass'; GRANT ALL PRIVILEGES ON web_search.* TO 'remote4'@'192.168.0.112'; I get the Error "actively refused connection" On my Config.php: <?php $user = 'remote3'; $password = 'mylegitpasswod''; $database = 'web_search'; $db = new mysqli('192.168.0.105',$user,$password,$database,3306); ?> my error
-
Hi! Recently I've been asked to help with small friend's app startup, which uses SQL databases. For now, they've been using dedicated server: Now they've obtained small office and wanted to place server on their own ground. I'm not sure what route I should go, since budget isn't quite big [~5300$ for whole server, rack, small UPS that would allow for emergency backup of database before shutdown, propably 1gbps switch] I've been looking at Gigabyte R162-Z10 (rev. 100), 64-128GB RAM, 16/24c EPYC 2nd gen & 2 nvme u.2 ssd's from intel or western digital, although it started to be pretty tight for budget. Database usage details: I'd really appreciate any help, also sorry for grammar-related mistakes!
-
So quick question, I am trying to check a value in a mysql database with php and just a simple check to see if it is at least a certain value, whats a good way to do this? Thanks <?php require("common.php"); if(empty($_SESSION['user'])) { header("Location: login.php"); exit("redirect: login.php"); } else { $query = " SELECT id, username, email, first, last, access_level FROM users "; } if($_SESSION['access_level'] <= 10) { exit("Access allowed"); } else{ header("Location: index.php"); exit("redirect: index.php"); } ?> <html> <head> <meta charset="utf-8"> <title>level 10 test</title> </head> <body> <p> level 10 test</p> </body> </html>
-
I have to make a query that I cannot, for the life of me, figure out. I have to return alliances that have more population than an average alliance has. But the thing is I have to calculate the average based on the number of population of an alliance, not individual players. In the spoiler window, there is a data model of the database. Oh and sorry that some text in the tables is in Slovene and not English.
-
Well the title says it all really. I'm looking for ideas to practise web development (both front- and backend) and I'm hoping you guys can help me out ^^ Any and every idea is welcome!
-
Hi all,We're looking to host a MySQL database for our cross-platform mobile game - does anyone know a good hosting site that will let users access the database directly and not via IP tunnels? We're currently looking into Firebase - does anyone have any experience with it? Cheers!
-
I am wondering what my fellow coders think the best development environment or solution is for a project that will use Django with MySQL for the data. This will be my first notable project and I want to start with a solution that will make for the least hassle come time to deploy to the web server. My current idea is to Django and MySQL containers with Docker and Compose. Any suggestions are appreciated!
-
MySQL server unreachable on some server, but not all server,e.g. MySQL server on server A(linode) web server 1 on server B(home hosted, port not blocked) web server 2 on server B(home hosted, port not blocked) web server 1 on server C(digital ocean) now my web server 1 on server B can connect to MySQL, but web server 2 on server B and web server 1 on server C can't(same user same database), what can cause this?and how to fix this problem?
- 2 replies
-
- mysql
- connection error
-
(and 2 more)
Tagged with:
-
Hi, currently working on a project requiring me to make a user database, first time for that. Semi experienced programmer. Anyone who has got any experience with creating databases like this, could you give me a short explanation of how it works and how to set it up, important things to note and helpful tips? Will probably be running it virtualized locally to begin with as a beta, and then if it works well will probably rent servers later on. As far as my understanding goes atm i dont need anything advanced as all i need is to grant permission to is a browser based software utility and the user database will give permission to those who have bought the software.