Hey all,
I am new to web development and have this project in hand where in I have to build a product catalogue. I don't want any cart functionality or other such features, I just want to display the products,their specifications and images etc. on the website and give my client an admin panel to manage products.
Now I looked into variou...
I´m trying to create a trigger on MySQL but I´m having a syntax problem, which I was not able to find. If someone more experience could help me it would be great (it´s the first time I use MySQL!)...
The reason why I´m creating this trigger is for deleting all the orphan "labels", which has a many-to-many relation with "service_descript...
At the moment I'm doing this:
gems(id, name, colour, level, effects, source)
id is the primary key and is not auto-increment.
A typical row of data would look like this:
id => 40153
name => Veiled Ametrine
colour => Orange
level => 80
effects => +12 sp, +10 hit
source => Ametrine
(Some of you gamers might s...
I have a problem with a subquery involving IPV4 addresses stored in MySQL (MySQL 5.0).
The IP addresses are stored in two tables, both in network number format - e.g. the format output by MySQL's INET_ATON(). The first table ('events') contains lots of rows with IP addresses associated with them, the second table ('network_providers') c...
Hi,
Table users
User_id, username, display_name, date_of_birth, email, telephone, website
On some social networking sites, I can control who can view my email, date_of_birth or display_name, for example, friends can view my email but not guests etc. If I have to offer something similar on my website where users can contol email, tele...
Hi,
I have a mySql database i want to display only 10 words from its body field which contain html codes, How i can do that, is there any php function to do that.
...
I'm using the sql below in a php script:
$sql1 = "LOAD DATA LOCAL INFILE 'test1.csv' INTO TABLE number1 (order_num,pname)";
$sql2 = "LOAD DATA LOCAL INFILE 'test1.csv' INTO TABLE number1 (order_num,pname) FIELDS TERMINATED BY ':'";
if ($result = $mysqli->query($sql)) {
printf("<br>Section 4: %s",$mysqli->error);
printf("|$result...
I have a very simple sql select statement on a very large table, that is non-normalized. (Not my design at all, I'm just trying to optimize while simultaneously trying to convince the owners of a redesign)
Basically, the statement is like this:
SELECT FirstName, LastName, FullName, State
FROM Activity
WHERE (FirstName=@name OR LastName...
Does anyone know of a good tutorial demonstrating inheritance in an entity framework model preferably where MySQL is the backend?
...
I'm playing around with the Lahman Baseball Database in a MySQL instance. I want to find the players who topped home runs (HR) for each year. The Batting table has the following (relevant parts) of its schema:
+-----------+----------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default ...
By what factor does the performance (read queries/sec) increase when a machine is added to a cluster of machines running either:
a Bigtable-like database
MySQL?
Google's research paper on Bigtable suggests that "near-linear" scaling is achieved can be achieved with Bigtable. This page here featuring MySQL's marketing jargon suggest...
I'm working on a system using lots of MySQL queries and I'm running into some memory problems I'm pretty sure have to do with me not handling pointers right...
Basically, I've got something like this:
MYSQL_ROW function1() {
string query="SELECT * FROM table limit 1;";
MYSQL_ROW return_row;
mysql_init(&connection); // "connec...
I'm working with an existing database schema, and trying to setup two Doctrine models with a Many to Many relationship, as described in this document
When creating tables from scratch, I have no trouble getting this working. However, the existing join tables use a different naming convention that what's described in the Doctrine docume...
Hi
I need some help in combining a stored procedure with another function.
I've got a stored procedure that pulls latitudes and longitudes from a database. I've got another function that checks whether a point is inside a polygon. My goal is to combine the two functions, so that I can check whether the latitude and longitude points p...
I am attempting to persist objects that contain some large Serializable types. I want Hibernate to automatically generate my DDL (using Hibernate annotations). For the most part, this works, but the default database column type used by Hibernate when persisting these types is tinyblob. Unfortunately, this causes crashes when attempting t...
Hello,
I am trying to figure out the SQL for doing some relatively simple operations on sets of records in a table but I am stuck. Consider a table with multiple rows per item, all identified by a common key.
For example:
serial model color
XX1 A blue
XX2 A blue
XX3 A green
XX5 B red
XX6 B blue
XX1 B ...
I'm trying to debug some auto-generated code, but I am a mySQL noob. Everything goes fine ultil the "prepare" line below, and then for some reason $mysqli_stmt is false, yielding the stated error. Could it have something to do with the SQL_MODE = 'ANSI'? The failure seems to have something to do with the string 'xxx' below, but it sti...
Right now we are dealing with a bit of a conundrum in my corporate environment where we are being blamed for a server crash, but I'm not 100% sure we are the culprit. Here's the server environment: We have a primary Coldfusion and its MSSQL database. We then also have a secondary database (MySQL) hosted on a different cloud which is used...
Hello all,
I have the following piece of code, executing a pretty simple MySQL query:
$netnestquery = 'SELECT (`nested`+1) AS `nest` FROM `ipspace6` WHERE `id`<='.$adaddr.' AND `subnet`<='.$postmask.' AND `type`="net" AND `addr` NOT IN(SELECT `id` FROM `ipspace6` WHERE `addr`<'.$adaddr.' AND `type`="broadcast") ORDER BY `id`,`subnet` D...
I have a row that has keywords in this way (keyword1, keyword2, keyword3) separated by commas as shown. When a user signs in, you know that he wants information about (keyword1, keyword3). Now, I have another table that has bunch of information related to different keywords, this table has a row called (keywords) which indicates if this ...