Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

join selects
Hello
i have t tables reactie and form and this query

$sql = "select reactie.persid,form.oproep,form.foto,form.id from
reactie,form
INNER JOIN reactie ON (reactie.persid = form.id)  group by reactie.persid
order by reactie.persid DESC LIMIT 0,5";

$result = mysql_query($sql);

Why i always get the error message invalid result resource? I want to group
the persid and order them DESC. But i cant get it to work can someone please
help?

reactie

logid    persid
1            2
3            2
4            3

form

id        oproep        foto
2        bla                blabla
3        frt                 hadiha



Report this thread to moderator Post Follow-up to this message
Old Post
Irlan agous
05-02-05 02:01 AM


Re: join selects
On Sun, 01 May 2005 20:44:24 +0200, Irlan agous wrote:

> Hello
> i have t tables reactie and form and this query
>
> $sql = "select reactie.persid,form.oproep,form.foto,form.id from
> reactie,form
>   INNER JOIN reactie ON (reactie.persid = form.id)  group by reactie.persi
d
> order by reactie.persid DESC LIMIT 0,5";
>
>   $result = mysql_query($sql);
>
> Why i always get the error message invalid result resource? I want to grou
p
> the persid and order them DESC. But i cant get it to work can someone plea
se
> help?
>

Did you make a mistake in your query? Do you really want to have this?

.. from reactie,form INNER JOIN   reactie ON (reactie.persid = form.id) ...

or do you just mean

.. from reactie,from where reactie.persid = form.id ....



Report this thread to moderator Post Follow-up to this message
Old Post
coolsti
05-02-05 02:01 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP SQL archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 09:07 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.