Ask a Question related to PHP Development, Design and Development.
-
Jeff Shapiro #1
Re: stuck with SQL
If you need to use subqueries, you need to upgrage to MySQL 4.1.x.
In 4.0.14 you can restructure your query using a LEFT JOIN on the tables.
something like (untest):
SELECT main.filename FROM main
LEFT JOIN GALLERY_DATA ON main.filename=GALLERY_DATA.filename;
In article <biok8q$ta6$1@news6.svr.pol.co.uk>,
"Mark" <markvanrossum@NOSPAMyahoo.co.uk> wrote:
> (hey, FAST response cheers!)
> Sorry, yep MY SQL:
>
> MySQL 4.0.14-standard running on .....etc
>
> (and using PHPMyADMIN to run the queries at the mo, when it works it will go
> in a PHP script...)
>
> "Andy Hassall" <andy@andyh.co.uk> wrote in message
> news:23lvkv8aqeq4kb3tckenhc0cd1h2uos6dg@4ax.com...> <markvanrossum@NOSPAMyahoo.co.uk>> > On Fri, 29 Aug 2003 23:32:11 +0100, "Mark"> to> > wrote:
> >> > >Arghhh, OK I am stuck so any help would be appreciated:
> > >SQL:
> > >SELECT filename
> > >FROM main
> > >WHERE filename NOT
> > >IN ( SELECT filename from GALLERY_DATA )
> > >
> > >Answer:
> > >You have an error in your SQL syntax. Check the manual that corresponds> filename> > >your MySQL server version for the right syntax to use near 'SELECT> copied> > >FROM GALLERY_DATA )
> > >
> > >I'm tearing my hair out, what the "($£$(£ is wrong with my SQL? I've> they> > >examples of websites (and modified the table/field names obviously) and> irrelevant.> > >don't work either.
> > >
> > >Oh, I know a join is faster, but they are only v small tables so>> >> > >(and i don't know what/how to do joins!)
> > The error says you're using MySQL. Which version are you using?
> >
> > Always post database type, and version, as SQL syntax and features differ
> > wildly between databases.
> >
> > MySQL 3.x does not support subqueries.
> >
> > --
> > Andy Hassall (andy@andyh.co.uk) icq(5747695) ([url]http://www.andyh.co.uk[/url])
> > Space: disk usage analysis tool ([url]http://www.andyhsoftware.co.uk/space[/url])
>Jeff Shapiro Guest
-
CFC Query - stuck, stuck, stuck
I am once again trying to use Dreamweaver. Here I want to create my first CFC. I'm following the online tutorial Building Your First Database... -
Stuck again
Ok i'm stuck on another one. I have four related tables retailers, products, price and category I need to have a form to add any new retailers.... -
I'm stuck
On Fri, Oct 10, 2003 at 01:15:26AM +0900, Friedrich Dominicus wrote: void do_stuff() { char i; VALUE obj; VALUE klass; obj = rb_str_new2("a... -
[PHP] Fw: Am stuck
On Thu, 25 Sep 2003 15:17:26 +0200 "Chris Grigor" <aphrodit@iafrica.com> wrote: Look up str_pad(). ____ Regards, Andu Novac -
php.. Am I stuck??
I purchased a program ( So I thought) that turned out to be just a bunch of php scripts put together. I am getting terrible support from the author...



Reply With Quote

