[neclimdul@gmail.com: Fwd: [development] LinksDB vs. Links]
Sammy Spets
sammys-drupal at synerger.com
Thu Aug 3 06:18:38 UTC 2006
Hi all,
> * Your SQL queries will not work on PostgreSQL. It needs
> db_query('word "%s" word') not db_query("word '%s' word").
For the reference of those that don't know yet, the correct way for both
MySQL and PostgreSQL is:
db_query("word '%s' word");
Strings in ALL database systems must be encased in single quotes. If you
do otherwise you're breaking the SQL standard.
Cheers,
--
Sammy Spets
Synerger Pty Ltd
http://www.synerger.com/
* You use double spaces after sentences in _report_submit.
* Listen, I know I said you shouldn't use drupal_goto a few bullets
ago. That doesn't mean you go and use drupal_set_header with a
Location: instead. Man alive.
* Oh, and you're passing ; at the end of most of
your SQL queries. You don't need to do that either.
* You use "'<Root>'" in linksdb_deadlinks, and '<Root>'
in linksdb_suggest. Which is it? (For what it's worth, it should
be '<'. t('root') .'>', per Drupal core).
* To prevent things like "select * from {links_links} where dead=1
order by {links_links}.name", use table abbreviations, like:
"select * from {links_links} ll where dead=1 order by _l_l_._n_a_m_e".
* if(variable_get('linksdb_show_report',1)==1) - you don't need ==1.
* linksdb_deadlinks doesn't translate the report messages.
* You use "links/report/$link->id" and then 'links/refer/' .
$link->id. Which is it? Concatenation or interpolation?
* Oooh, you do know how to predeclare $form = array() in _suggest().
I guess you must have made sloppy mistakes all the other times.
Story of your life, eh?
* "({name},{url},{description},{active},{category})" - I have no clue
what you're even attempting there. Column names aren't prefixed.
* Is it site staff or site administrators? You use both.
* theme_link() - Gah, you don't use theme('image') here.
* Is it "Link" or "link"? Previously you have "Report
this link", but then you have "Edit Link".
* $cat->shown=99999999;. Right. Heh.
* You seem to use the "Report this link as dead"
thing a lot. That should be made a function.
* # for comments? What is this, Perl?
And so on. But I'm getting bored.
--
Morbus Iff ( drowning in data, bereft of knowledge. )
Technical: _h_t_t_p_:_/_/_w_w_w_._o_r_e_i_l_l_y_n_e_t_._c_o_m_/_p_u_b_/_a_u_/_7_7_9
Culture: _h_t_t_p_:_/_/_w_w_w_._d_i_s_o_b_e_y_._c_o_m_/ and _h_t_t_p_:_/_/_w_w_w_._g_a_m_e_g_r_e_n_e_._c_o_m_/
icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / _j_a_b_b_e_r_._o_r_g: morbus
----- End forwarded message -----
More information about the development
mailing list