Search for Plugins: Advanced
Please Sign in, Register or Resend Activation Email


  e107 :: Forums :: E107 Plugins :: Code Bank
<< Previous thread | Next thread >>  
Linked tabled with db_Select          
Author Post
Sun Sep 26 2004, 12:34PM
Registered Member #15461
Joined: Thu Sep 09 2004, 01:56PM
Posts: 2

I posted this on the site as well, I think it might be better to post it here, but I am not allowed to delete my other post at, so I hope you will excuse the double posting.

Anyway, I am trying to setup a query with the db_Select funktion in e107 and am wondering if it is possible to setup a query with linked tables seeing that the db_Select is not using the same format as the standard SQL queries I am used to?!

Thank you so much for any help!

Mon Sep 27 2004, 09:16AM

Registered Member #330
Joined: Wed Jun 11 2003, 08:04AM
Location: Liverpool
Posts: 491
If you are linking/joining tables you can use the db_Select_gen($arg)

where $arg contains the select statement you wish to use. You do need to put the table name in full for example use something like <div class='indent'> $arg = "select * from ".MPREFIX."user left join ".MPREFIX."user_classes on ......";

The MPREFIX defined constant contains the table prefix set during installation. With Select_gen you can pass any sql to the database, including update, insert and delete.

db_Fetch() etc will work as expected after using Select_Gen.



<span class='smallblacktext'>[ Edited Mon Sep 27 2004, 09:20AM ]</span>
Back to top
Mon Sep 27 2004, 09:18AM

Registered Member #330
Joined: Wed Jun 11 2003, 08:04AM
Location: Liverpool
Posts: 491
Oops code /code bbcodes didn't work but I think you get the ides
Back to top

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System
Render time: 0.1760 sec, 0.0957 of that for queries. DB queries: 31.