Hello, i have two tables one of is users:
id int(11) NO PRI NULL auto_increment
membership_type tinyint(3) unsigned NO MUL NULL
username varchar(16) NO NULL
password char(40) NO NULL
email varchar(100) NO NULL
firstname varchar(40) NO NULL ...
While digging through some old code put together by a former co-worker who's talents I looked up to I noticed after every query they closed the connection the MySQL server.
This seems a bit odd since I've always just closed it at the end of the page and seen most people do the same.
So the question is, is this the best idea in PHP/MySQ...
Longtext datatype is the largest capacity(4bytes) datatype in mysql. But it is not enough to store website content page. I’ve tried several times and searched well. And I think MYSQL can able to store maximum of 16KB for Each table. So I’m not able to store all page contents into our table “PAGE”. I’m searching for how to recover this....
I have a table of products which contains some 2000 clothing products, each product has a grpIdent field and a productGroup field.
when I run the following query:
select count(1)
from tblclothingitems ci
where productGroup='hel'
group by productGroup, grpIdent
I get a resultset of 99 rows, according to SQL Yog, containing differen...
I'm trying to write a rake task for loadin data into my database. My plan is do something like
system "mysql -u foo -pbar database < backup.sql"
but I need to access the config/database.yml data for getting the user, pass and database info. The trik is I don't want to "parse" this file but to access this info in the same way tasks lik...
Roughly about 20% of the time when clicking on links in my website (www.slr-lens.co.uk), the site completely fails to load. I have tried removing and adding all code segments but to no avail... I've also asked the web hosts, but apparently the server is working normally.
Does anyone have any suggestions about what could cause a web pag...
I am trying to write a query to find the score rank of a user's games. I need it to take in a user id and then return that user's relative ranking to other user's scores. There is a user and a game table. The game table has a userId field with a one-to-many relationship.
Sample table:
users:
id freebee
1 10
2...
I use MySql Server 5.1. I have a MySql table with a longtext column. I'm writing a program in C# 2010 using MySql Connector 6.3.1 and I want to select that column in my program using regular linq.
I have inserted some text using MySql Workbench. As long as the text is <32kb, I can select it in my program. As soon as this text is > 32kb,...
I am having a problem trying to pull a path name from a DB in MySQL and then searching the path using Simple HTML DOM. The issue is that there are 2000+ entries and I know that is what is causing the connection issues.
Error Message: A connection attempt failed because the connected party did not properly respond after a period of time...
CREATE TABLE jokecategory (
jokeid INT NOT NULL,
categoryid INT NOT NULL,
PRIMARY KEY (jokeid, categoryid)
) DEFAULT CHARACTER SET utf8;
especially PRIMARY KEY (jokeid, categoryid)? or is there a better way to write this?
Thank you in advance;-)
...
Hello,
Say i have a table named tbl1 in mysql :-
bookid int
name varchar(20)
price int
categoryid int
And then i have a 2nd table, tbl2 in Oracle :-
pubid int
name varchar(20)
addr varchar(50)
I want to combine these two into MS Sql Server 2008 named tbl3 whose structure should be :-
bookid int
name varchar(20)
price int
pubid in...
Hi all,
I'm currently coding a product which will have only one database but will host many clients by using a global identifier of a customer_id.
This is all very good.
However, let's say we have a table called Ticket. Idea has a primary key. When a user adds a ticket, the ticket will correspond to the customer via a foreign key etc....
There's a few questions like this on Stack Overflow but because i can't find any quite similar enough for me to follow.
I'm looking to select rows from db which are within x miles of a target.
example table columns:
| city_name(varchar) | lat(decimal) | lon(decimal) |
query effect i'm looking for (either using php or mysql)
$target...
I am trying to write a script to parse the MySQL slow query log. I have seen 1 or 2 parser.
does anyone know how to extract the information from that log? I mean does anyone know the structure of the file so I can work with that and if anyone know a good parser for this log file?
thanks
...
Ok. I'm new to MySQL have a SELECT statement I can't wrap my head around.
I have a table of books with a primary key of ASIN (10-digit ISBN), and I have a table of tags with a auto-incrementing primary key. Then I have a junction table to show which ASINs have which tags associated with them.
I can use this SELECT statement to give a...
I'm trying to figure out the best way to do the following:
If a user chooses a certain day, say June 21, 2010 we will repeat an event every 3rd monday of every month, but if they choose June 28, 2010 the event will repeat every last monday of every month. This is how google calendar does it, and I'm trying to repeat that functionality. ...
I have five tables:
tab_template
template_group
group
user_group
user
Tab_template's are organized into groups with the template_group relational table.
Users's are organized into groups with the user_group relational table.
Group's can be public or private (using a tinyint boolean column in the table).
I want to query for all of th...
I want to import really clean .txt files into Mysql with PHP. I've read that this is easy if you know the delimiter. but I don't.
In my case, the .txt files look like tables - ie: they're still structured like tables, not like a standard, jumbled CSV file.
Does this mean I don't have a delimited file? If so, any advice on how I mi...
Scenario is simple to describe, but might have a complex answer:
Imagine a case where you have one write only mysql database. Then you have about 5 or 6 read only databases. The write database has a count for a particular inventory. You have hundreds of thousands of users banging away at this particular inventory item, but only limited ...
Hello guys. I know this one might be easy but I couldn't figure out.
I have a List control that retrieve multiply data from Mysql. When a use clicks the data on List, The datagrid will display the data and the product image will show.
I can see the multiply data shown in my dataGrid, but I don't know how to get the individual data show...