Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
6 - 2 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     
prefix('mytable')." WHERE recordid =".$_GET['id']; $result=$xoopsDB->query("SELECT id FROM ".$xoopsDB->prefix('mytable')); [/quote] Mmm, something like that. :-) AAINC[/quote]" />

Re: DELETE FROM not working
by fatman on 2003/12/17 6:45:14

yeah.. I just didn't know that I had to be sending my id with POST and not GET. So I just changed my link to a small form and submitted the request by post.

If you have that option you should try it. I didn't give your method above a try. But thanks for the response.

also.. I have to give total props to the core team here. XOOPS lets me forget about having to worry about so many things and I can focus on just the functionality of my pages and my user.

I'm pretty decent with php/mysql so I'm just getting used to the XOOPS core class files.
Re: DELETE FROM not working
by AAINC on 2003/12/17 4:41:01

Cool did it work, what you found?
Re: DELETE FROM not working
by AAINC on 2003/12/17 4:39:13

Hello,
would love to get copy of what you currently have..

Try something like this.
I have been having problems myself, so this only suggestion.

Quote:

$xoopsDB->queryF("DELETE FROM ".$xoopsDB->prefix('mytable')." WHERE recordid =".$_GET['id'];

$result=$xoopsDB->query("SELECT id FROM ".$xoopsDB->prefix('mytable'));


Mmm, something like that.

AAINC
Re: DELETE FROM not working
by fatman on 2003/12/17 4:32:22

I found the answer myself in another thread.

https://xoops.org/modules/newbb/viewtopic.php?topic_id=14723&forum=7#forumpost60438
DELETE FROM not working
by fatman on 2003/12/17 3:04:41

I'm new to XOOPS but loving every minute of it. I'm building my first module which does little more than add and edit records from a single table. However, I can't seem to get xoopsDB to delete a record for me. I've been able to search and update records with no issues, but the following code doesn't work. Can someone enlighten me?

le="color: #000000"><?php $sql = "DELETE FROM ".$xoopsDB->prefix('mytable')." WHERE recordid = ".$_GET['id']; $result = $xoopsDB->query($sql);


The SQL statement works if given directly to my MySQL server.

Who's Online

810 user(s) are online (760 user(s) are browsing Support Forums)


Members: 0


Guests: 810


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits