Re: SQL query

2001-09-09 Thread Ian Moore
It would be better to use joins. Something like this: SELECT swimmers.surname_swimmer , swimmers.name_swimmer , swimmers.born , results.result , results.scale , competitions.date_competition FROM results left join disciplines on results.sif_discipline = disciplines.sif_discipline left join

Re: Help?

2001-09-08 Thread Ian Moore
On Sat, Sep 08, at 07:29pm, Kenneth Wells ([EMAIL PROTECTED]) wrote: ?php $ACID_VERSION = 0.9.6b6; /* Path to the DB abstraction library */ #$DBlib_path = ../../adodb; DBlib_path = c:\snort\adodb; ^^^ missing $ before variable name DBlib_path is probably confusing things. This isn't really

Re: Select Highest ID query

2001-09-07 Thread Ian Moore
On Thu, Sep 06, at 11:05pm, Chris Bolt ([EMAIL PROTECTED]) wrote: SELECT * FROM yourtable WHERE id = LAST_INSERT_ID(); But that will only work if it was the same thread that inserted the last record in the table. If this is running from say .. a script that just wants the last inserted record

small mysqlshow bug

2001-09-06 Thread Ian Moore
I beleive this is a bug in mysqlshow: I have a database with an underscore in it's name (which is valid), but mysqlshow thinks I'm trying to do a wildcard and lists databases which match the pattern instead of showing what I want it to show. For instance: If last argument contains a shell or

Max_data_length

2001-09-06 Thread Ian Moore
Shouldn't Max_data_length on a heap table be the same as the max_heap_table_size variable as long is max_rows is not set? My heap table can grow up to about 200mb. If I set the limit max_heap_table_size at 256MB, Max_data_length ends up being around 110MB. This gives me the 'table is full' error

Re: Select Highest ID query

2001-09-06 Thread Ian Moore
This is what I use in those situations: select * from TABLE_NAME order by ID desc limit 1; On Fri, Sep 07, at 01:43pm, Chris Aitken ([EMAIL PROTECTED]) wrote: Hi all, Just quickly, Im managing to do this, but I can see that the method im using is not as efficient as it could be. What

Re: table full error

2001-09-05 Thread Ian Moore
That's what I thought at first as well. But my tmp_table_size is set to 64MB and I used the --big-tables option just to be sure. Also, show table status says the size is well below 64MB: Name | Type | Row_format | Rows| Avg_row_length | Data_length | Max_data_length tmp| HEAP |

Re: Query Help

2001-09-05 Thread Ian Moore
There may be a better way, but right off the top of my head I'd say: select tagnumber,days,expdate from membership left join tags on membership.tagid = tags.tagid where tags.tagid is not null On Wed, Sep 05, at 06:10pm, [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote: Hello All, I got a

Re: Query Help

2001-09-05 Thread Ian Moore
records, how many orderids match the tagid in the same table .. etc... On Wed, Sep 05, at 07:26pm, Ian Moore ([EMAIL PROTECTED]) wrote: There may be a better way, but right off the top of my head I'd say: select tagnumber,days,expdate from membership left join tags on membership.tagid