I have these two tables:
tAccounts
id, name, server_id
tFriends
id_lo, id_hi
Now, I'm trying this query:
SELECT FR.id_lo AS id_friend
FROM tFriends FR, tAccounts AC
WHERE (FR.id_hi = 4 && AC.server_id != -1)
........ In order get the friends of a certain user, while making sure his friend's server_id is different than '-1' !
Any i...
Using Windows Server 2003, MySQL 5.1.23, MySQL .NET Connector 6.2.2
I am trying to use the MySQLBulkLoader class to read in a fixed width text file. An excerpt from that classes Load method is:
string sql = BuildSqlCommand();
MySqlCommand cmd = new MySqlCommand(sql, Connection);
cmd.CommandTimeout = 10 * 60;// Timeout;
cmd.ExecuteNonQ...
Hello all, im not sure if this is php or mysql maths question.
Ive got a table full of data, and although i can echo the individual data to the screen or echo and individual piece of data using php. I've no idea how to perform maths on the data itself.
For simplicity, say my table has 4 columns, an id column and three with my data i wa...
Hi guys
my boss wants me to create a mysql database for an existing excel file. I was wondering if there are any ways to do convert or import excel file? I have searched google but didn't find anything useful. I appreciate for any reply....Thanks.
...
I want to write an app in visual studio that will work in linux. It's main function will be to monitor multiple linux systems and provide health and status to the GUI... I.e disk usage, bad drives, network throughput, mysql reads/inserts, ect... Can I cross compile with visual studio 2010?
Should I even bother using visual studio? Or ...
This is based on my previous question.
I have the following table
Table1
JobPositionId | JobPositionName
1 | Sound
2 | Lights
3 | Sound
4 | Ground
How can I delete row three (Name = sound, and max position)
...
I need retrieve data from 2 tables at the same time, the tables are not linked by foreigns keys or such.
$query1 = "select idemployee from employee where address like 'Park Avenue, 23421'";
$query2 "select idcompany from company where bossName like 'Peter'";
How can I do this with a kinda thread in PHP?. I've heard that threads ar...
For examples I don't know how many rows in each table are and I try to do like this:
SELECT * FROM members
UNION
SELECT * FROM inventory
What can I put to the second SELECT instead of * to remove this error without adding NULL's?
...
First up, apologies for the awful title I couldn't think of a better way to articulate my issue. (Feel free to suggest better altnernatives)
Basically I have a table with a "count" column.
I want to reset all counts to zero except for the 10 rows with the top values. I want them to be reset to 0.
How do I achieve this without writing ...
I log into mysql like normal but whenever I enter a command such as describing a table:
DESCRIBE status_types;
I get text back that is markup-ish, like an HTML table instead of the usual text table.
<TABLE BORDER=1><TR><TH>Field</TH><TH>Type</TH><TH>Null</TH><TH>Key</TH><TH>Default</TH><TH>Extra</TH></TR><TR><TD>status_type</TD>...
I'm designing a database in MySQL and PHP for a basic CMS. The CMS will have a front end which will allow sorting and searching. The backend will allow authorized users to upload files.
I'm using PHPMyAdmin and I'd like help setting up my database.
I am open to answers explaining various MySQL datatypes and what they are good for as w...
Suppose I have two tables:
CREATE TABLE A(
id INT PRIMARY KEY,
x INT,
y INT
)
CREATE TABLE B(
id INT PRIMARY KEY,
x INT,
y INT,
)
Table A contains data brought in from another vendor while table B is our data. For simplicity, I've made these tables be exactly the same in terms of schema, but table B would lik...
I have a combobox where the user can select a particular year (populated by the database) and view particular information for the year. That information is stored in a datatable which is bound to a datagrid. I want it to recreate the data grid when I change the year.
_PropertyTenantData is a DataTable that has 14 columns Property Id, Pr...
How can I calculate the amount of 5 minuet periods passed with a datetime type?
is it possible?
//Update AP (+1 points every 5 mins)
// PLAN OF ACTION (for ap update)!
// 1. check how long it has been since last update
// 2. calculate how many 5 min periods has passed
// 3. update $ap accordinly
if ($last_ap_update != "000...
Ok so i am having a problem with figuring this problem out. I have a dynamic page that has records pulled out of a mysql database. The php code works great. The code is below
$catagory = $_GET['type'];
$query = "SELECT p.name, p.price, pc.quantity, p.image, p.descr FROM products ... where category_name = $catagory ";
$result = mysql_qu...
One of the more interesting "features" in Coldfusion is how it handles external requests. The basic gist of it is that when a query is made to an external source through <cfquery> or or any other external request like that it passes the external request on to a specific driver and at that point CF itself is unable to suspend it. Even if...
OK so what's the problem with this. I tried using MySQL JConnector for Java and people say not to because it can comprise your applet details so then I told them I'd use PHP $_GET method URLs using PHP scripts. They said it would be fine. However, I find two problems with that.
1.) They are slow. It takes at least 4-5 seconds for the UR...
I'm not sure how to go about doing this.. I want to add a Paypal "buy now" button on my website and when a user pays I want to save the date they paid into the database using mysql.
How would this be possible?
...
Great site, tons of help to me so far.
I have a database with 10,000+ rows.
There is a column ( tinyint(4) ) called ahtml.
I need to change ~500 of the rows for that column from 0 to 1.
I know there is a query I can run in phpadmin to do that instead of editing each row.
I need to change ALL of the 0's to 1's in the ahtml column.
G...
I'm not really sure why the following console application doesn't produce the expected behavior for last_insert_id(). I've read that last_insert_id() returns the last auto_incremented value for a particular connection, but in this code, the same result is returned for both connections. Can someone explain where I've gone wrong?
st...