musiconly |
|
---|---|
I caught some god damn cold and I'm stuck at home on saturday night
![]() I'm trying to create a plugin which I called User Comments. Features:
Show last X comments on user profile(hook: users.details.main) Show all comments from this user(standalone) Top commentators(probably standalone) I got stuck!!! I got the count part working ![]() I can only see the content of div "You look like you did before", but no ROW data? What did I miss? I'm reading Koradhil's tutorial on plugins ![]() Thanks |
GHengeveld |
|
---|---|
You need to import the $ui variable from GET, otherwise your query won't work. Also it's better to cast or check any variables used in an SQL query. Integers should be cast using (int)$variable and strings need to be prepped using sed_sql_prep(). Another minor detail is that you shouldn't put quotes around an integer, since that would require it to be converted from string to integer.
Try this: $ui = sed_import('ui', 'G', 'INT');
$sql2 = sed_sql_query("SELECT * FROM $db_com WHERE com_authorid=".(int)$ui); For the rest of it, it's looking good, keep it up. Glad to see my guide gets used too ![]() |
|
This post was edited by Koradhil (2009-10-25 06:06, 15 years ago) |
musiconly |
|
---|---|
Thanks Koradhil for a great explanation
![]() ![]() ![]() I'm not a PHP programmer (C++ is my playground), but I forced myself to learn it because of some mods/plugs that I'll need for my website. If I get stuck on another thing, I'll post it here ![]() |