Compare to tables in a mysql-database

I've got two tables in a mysql-database. table "names": ID | name 100 | smith 136 | king 224 | brown 485 | miller and the second table "adresses": name_ID | adress 100 | mainstreet 11 101 | hiddleburger street 33 102 | great avenue 1022 103 | ...
more »

2017-09-10 21:09 (1) Answers

Django query group by month and year

I have a Django model like this: class EVENT(models.Model): user = models.CharField(max_length=255) pay_time = models.DateTimeField(default=timezone.now) I need to calculate the average number of records per month I have for a certain gr...
more »

2017-09-10 14:09 (1) Answers

How to write database module in nodejs

In my project, I am using MySQL database. The problem is, that I don't know how to write simple database module to one js file. My code is: File: database.js var mysql = require("mysql"); var connection = mysql.createConnection({ host: "local...
more »

2017-09-09 17:09 (2) Answers

Registration not inserting data

Hello stackoverflow community. I'm currently developing a small school project, But having trouble creating the registration. It seems like it's not posting any data to my database. Not sure what's causing this. Since i can manually insert data from ...
more »

2017-09-09 14:09 (1) Answers

Extract XML In A MySQL Table Column

I have a table 'Users' with column 'Values' in a MySQL database which has XML data like so: <Attributes> <Map> <entry key="first" value="Linda"/> <entry key="groups" value="Manager"/> <entry key="last" value=...
more »

2017-09-08 21:09 (1) Answers

MYSQL Not using Possible Keys

I have main table called "element": CREATE TABLE `element` ( `elements_id` int(11) NOT NULL AUTO_INCREMENT, `elements_code` varchar(32) DEFAULT NULL, `elements_name` varchar(128) DEFAULT NULL, `elements_description` text, `elements_image` ...
more »

2017-09-08 06:09 (1) Answers

Using JSON to get info from a database

Dear fellow Coders/Hacker/Programmers all around. I am in need of some help. I am using the code below to get Info from my MySQL database. This is the PHP code: <?php ini_set("display_errors", true); ini_set("html_errors", false); require "conn.p...
more »

2017-09-08 05:09 (1) Answers

Do I need a database to handle my website content?

So I'm building a website that contains information about a bunch of different animal species. I will have a list of 500 items, that should be able to be filtered and sorted by different criteria. For example, I will have a 'country selection' option...
more »

2017-09-07 00:09 (1) Answers

PHP MySQL - Update 6.5m rows performance issues

I am working with a MySQL table and I need to increment a value in one column for each row, of which there are over 6.5m. The col type is varchar and can contain an integer or a string (i.e. +1). The table type is MyISAM. I have attempted this wi...
more »

2017-09-06 13:09 (3) Answers

Get data from tables in one query

I have four tables in my database 1)Coupon 2)Flyer 3)Deals 4)User these tables have some data and primary key. User can add deal, coupon and flyer in add to cart.I want to know how to make a add to cart table where i can fetch all the coupon, deals ...
more »

2017-09-03 13:09 (3) Answers

Writing Query with IN using EXISTS

I'm currently learning SQL and I'm currently trying to re-write a query using IN with EXISTS but nothing seems to give me the correct answer. The question is: For each rating that is the lowest (fewest stars) currently in the database, return the re...
more »

2017-09-03 13:09 (2) Answers