Search Results

Showing results 1 to 39 of 39
Search took 0.01 seconds.
Search: Posts Made By: pty ; Forum: MySQL and child forums
Forum: MySQL 20 Days Ago
Replies: 1
Views: 398
Posted By pty
id is your primary key so it is already indexed


mysql> show indexes from artikulli;
Forum: MySQL Jun 5th, 2009
Replies: 4
Views: 1,062
Posted By pty
Sorry didn't realise your server was Windows. I'm not an expert on Windows but I'm sure you could use a scheduled task in cron's place.
Forum: MySQL Jun 5th, 2009
Replies: 4
Views: 1,062
Posted By pty
I think you should look at the LOAD DATA INFILE (http://dev.mysql.com/doc/refman/5.1/en/load-data.html) docs and cron a script to import for you
Forum: MySQL May 29th, 2009
Replies: 3
Views: 650
Posted By pty
I misunderstood your first post.

If the column is varchar and you have a comma separated list of IDs there isn't a clean way of joining.

You should review your table design and possibly...
Forum: MySQL May 29th, 2009
Replies: 3
Views: 445
Posted By pty
You seem to be getting mixed up with your joins.

You need to do an inner join to get the winning bids. I'd create this as a view:

I just typed this from memory so sorry about the table/column...
Forum: MySQL May 29th, 2009
Replies: 3
Views: 650
Posted By pty
Not really sure what you're asking. What column type is sales_categories?

Also your SQL is confusing; try aliasing the table names and aligning it:


SELECT pd.products_name,
...
Forum: MySQL Feb 5th, 2008
Replies: 3
Views: 744
Posted By pty
select ar.url
from amp a
join ampref ar on a.amp_id = ar.amp_id
where a.name like 'luna'
Forum: MySQL Nov 28th, 2007
Replies: 5
Views: 4,506
Posted By pty
$condition1 = @$_GET['cond1'] ;
$condition2 = @$_GET['cond2'] ;
$condition3 = @$_GET['cond3'] ;

mysql_connect("dbhost","dbuser","dbpass") or die("Unable to connect to server");...
Forum: MySQL Nov 27th, 2007
Replies: 1
Views: 1,680
Posted By pty
I find it easier to specify the join as follows and seperate the where clause; if your data is correct the following query should work:


select
ap.name
,ap.add
,p.status
...
Forum: MySQL Sep 2nd, 2007
Replies: 2
Views: 1,077
Posted By pty
select id,
( cast(current_timestamp as date) - cast(return_date as date) ) * 3 as fine
from books
where
return_date > current_timestamp


This is how to do the select in postgresql however...
Forum: MySQL Jul 15th, 2007
Replies: 1
Views: 5,059
Posted By pty
I suggest using transactions (you need the InnoDB storage engine for this).


start transaction
insert into blah...
insert into blah...
commit


If one of your statements causes an...
Forum: MySQL Jul 9th, 2007
Replies: 2
Views: 1,408
Posted By pty
http://www.mysql.com/products/tools/
Forum: MySQL Jul 7th, 2007
Replies: 3
Views: 1,936
Posted By pty
Also you may want to temporarily stop using indexes on the tables in question
Forum: MySQL Jun 12th, 2007
Replies: 3
Views: 1,840
Posted By pty
I didn't see this thread sooner and it may now be too late, but 1 database is the way to go; easier to manage, easier to optimise, easier to backup, faster, requires less disk space.. 1 database is...
Forum: MySQL May 16th, 2007
Replies: 2
Views: 4,125
Posted By pty
Hi, Rather than using wildcards I think you should try using the trim (http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_trim) function on the string.

However if you have a big...
Forum: MySQL Feb 25th, 2007
Replies: 7
Views: 2,159
Posted By pty
Is the MySQL server on your computer? If to leave host as 127.0.0.1

Then put your login name and password in. On windows it should have asked you for an admin password when installing; if so...
Forum: MySQL Feb 25th, 2007
Replies: 7
Views: 2,159
Posted By pty
Yeah but MySQL Administrator and MySQL Query Browser are better if have straight access to the database. PHPMyAdmin is ok for the odd job if you don't have access on 3306 or whatever.
Forum: MySQL Feb 19th, 2007
Replies: 2
Views: 2,507
Posted By pty
You should be using the avg and max functions.

So to get the average price


select avg(price) from books;


or the most expensive
Forum: MySQL Jan 22nd, 2007
Replies: 1
Views: 1,359
Posted By pty
Have you checked the logs?

Is this db on your own machine or hosted?

Did you take a backup?
Forum: MySQL Jan 19th, 2007
Replies: 2
Views: 2,419
Posted By pty
In my opinion all things that can be ordered should be treated the same, so you'd have a table of orders, a table of items (this can include cars), and a table of categories (cars, parts, gifts etc)...
Forum: MySQL Nov 21st, 2006
Replies: 1
Views: 1,533
Posted By pty
host should be where your database server is located; if it is on the same box as apache/php then set host to 'localhost', if its elsewhere use the IP address of the database server.

May also be...
Forum: MySQL Oct 20th, 2006
Replies: 1
Views: 1,285
Posted By pty
Why would the student id be included in the modules table?

I assume a student may have zero, one or many modules and a module may have zero, one or many students.

What I think you need is a...
Forum: MySQL Sep 20th, 2006
Replies: 5
Views: 4,674
Posted By pty
you really think more people use MySQL than Access?

In terms of web design, then yeah - you're probably right but Access is definately more commonly used in general terms.

Obviously, popularity...
Forum: MySQL Sep 13th, 2006
Replies: 1
Views: 2,941
Posted By pty
The official GUI tools (http://dev.mysql.com/downloads/gui-tools/5.0.html)
Forum: MySQL Sep 10th, 2006
Replies: 5
Views: 1,611
Posted By pty
A join basically combines records from more than one table. This (http://en.wikipedia.org/wiki/Join_(SQL)) article may help but the best way to understand is to make some test tables and actually...
Forum: MySQL Sep 10th, 2006
Replies: 5
Views: 1,611
Posted By pty
select ft.s_id
from first_table ft
join second_table st on ft.s_id = st.s_id
order by st.s_id
Forum: MySQL Aug 22nd, 2006
Replies: 3
Views: 43,548
Posted By pty
select *
from table
where date >= [start date] and date <= [end date]

or (i'm not 100% sure if this works in mysql but it does in postgres!)

select *
from table
where date between [start...
Forum: MySQL Aug 8th, 2006
Replies: 1
Views: 2,100
Posted By pty
i don't really understand what you want but to make a 3rd table from two others you can use the following:

insert into table3 t3 (columns you want)
select (columns you want)
from table1 t1...
Forum: MySQL Aug 6th, 2006
Replies: 2
Views: 4,094
Posted By pty
make the two fields unique in combination. it is probably possible in MySQL but this is how to do it in PostgreSQL. If the syntax is different in MySQL you'll have to check the docs


ALTER...
Forum: MySQL Jul 24th, 2006
Replies: 8
Views: 10,772
Posted By pty
No problem. I when you said 'i have two servers' I assumed you were talking about work.

If you're starting I recommend this (http://php.about.com/od/learnphp/p/learn_php_free.htm). Also, the php...
Forum: MySQL Jul 24th, 2006
Replies: 8
Views: 10,772
Posted By pty
$connection = mysql_connect(IP_ADDRESS_OF_DATABASE_SERVER:PORT_YOU_SET_MYSQL_TO_LISTEN_ON, DB_USER, DB_PASS)
or die("Query failed : " . mysql_error());
$db = mysql_select_db(DB_NAME,...
Forum: MySQL Jul 23rd, 2006
Replies: 8
Views: 10,772
Posted By pty
Just set the host parameter of the mysql_connect function to the IP address of the other server. You'll also need to open the MySQL port (3306) on the other server if it's closed
Forum: MySQL Jul 20th, 2006
Replies: 3
Views: 2,777
Posted By pty
To be honest I'm no MySQL expert (PostgreSQL fan) but it seems that MySQL has just skipped the inserts that would cause problems:


Query OK, 0 rows affected (0.03 sec)
Records: 10 Duplicates:...
Forum: MySQL Jul 19th, 2006
Replies: 3
Views: 2,777
Posted By pty
do any of your fields have a unique constraint?

yes. thought so.
Forum: MySQL Jul 14th, 2006
Replies: 2
Views: 1,885
Posted By pty
you cant get MySQL-Max 4.1.20 from their site (http://dev.mysql.com/downloads/mysql/4.1.html); not the exact version you specify but pretty close, only bugfixes and minor changes afaik
Forum: MySQL Jul 11th, 2006
Replies: 2
Views: 9,341
Posted By pty
your expression is probably wrong, however, it is difficult to diagnose unless you post it and some of your schema
Forum: MySQL Jul 3rd, 2006
Replies: 5
Views: 4,674
Posted By pty
my guess would be perl for scripting language and access for database.

note, i'm not ranking those guesses on how good they are; just how many people use them



edit: i didn't read the 'on...
Forum: MySQL Jun 27th, 2006
Replies: 3
Views: 5,662
Posted By pty
can you paste the surrounding code/function?
Forum: MySQL Jun 13th, 2006
Replies: 2
Views: 6,331
Posted By pty
if you don't have date fields in the tables you want to 'clean', or tables you can easily join, it could be tricky.

can't you just revert to a backup?
Showing results 1 to 39 of 39

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC