Forum development for v0.8

e107 CMS » Forums » e107 Code » Plugin / Code Developer Discussion << Previous thread | Next thread >>
Go to page  1 2 3 4 5
Moc
Oct 19 2011, 03:40PM
  • e107 Site administrator
  • e107 Security Team
  • e107 Support Team
  • e107 Documentation Team
Registered Member #44563
Joined: Apr 12 2008, 03:01AM
Location: The Netherlands
Posts: 3628
Both backend and frontend.

I thought about your previous question regarding the separation of category/forum view and post classes, and I think my reply could be useless depending on the new user class structure that is introduced in v0.8. Will test this out on my test installation and report back later.
Go to top
Crytiqal
Oct 20 2011, 12:02AM
  • e107 Support Team
Registered Member #53493
Joined: Oct 31 2009, 04:55AM
Location: Looks like a room...
Posts: 539
thanks Moc

Always nice to have a helping hand.
I think i'll create a account on some code dropbox, or maybe I could receive access to the svn afterall, so I could publish my code for review?

Whenever I am mostly done with something I could upload it there and get it checked for bugs

Well, I mostly test my code extensivly, but security is important. (Like serializing and stuff?)
[ Edited Oct 20 2011, 12:03AM ]
Go to top
Moc
Oct 20 2011, 01:16AM
  • e107 Site administrator
  • e107 Security Team
  • e107 Support Team
  • e107 Documentation Team
Registered Member #44563
Joined: Apr 12 2008, 03:01AM
Location: The Netherlands
Posts: 3628
You might try github, or just create an account at sourceforge.
Go to top
Crytiqal
Oct 21 2011, 04:01AM
  • e107 Support Team
Registered Member #53493
Joined: Oct 31 2009, 04:55AM
Location: Looks like a room...
Posts: 539
Which of the following is better?

In forum_f, having each row containing the following columns;
forum_forum_subs <- an array of all the subforums this forum carries.
forum_forum_sub <- show if forum IS a subforum or not. (0=no sub, x=id of parentforum)

Then have the code select all rows where forum_forum_sub = '0' (Thus forum is NOT a subforum).

$sql2->db_Select("forum_f", "*", "WHERE forum_parent_id='".$forum_parent_id."' AND forum_forum_sub='0'", false);
while($row2 = $sql2->db_Fetch())
{
// process $row2
extract($row2)
!-- then check if $forum_forum_subs contains an array and for each of these value's db_Select() the corresponding subforum and display them
}

OR

forum_forum_sub <- show if forum IS a subforum or not. (0=no sub, x=id of parentforum)

$sql2->db_Select("forum_f", "*", "WHERE forum_parent_id='".$forum_parent_id."' AND forum_forum_sub='0'", false);
while($row2 = $sql2->db_Fetch())
{
// process $row2
$sql3->db_Select("forum_f", "*", "WHERE forum_forum_sub='".$forum_forum_id."', false);
while($row3 = $sql3->db_Fetch())
{ // process $row3 }
}

The first way is a bit of extra coding, but it will only query the db if the forum does indeed contain an array of subforums,
(When deleting or moving a subforum, the parentforum's array must also be edited every time etc).

the second method ALWAYS queries the db for subforums...

Thoughts?...
[ Edited Oct 21 2011, 04:02AM ]
Go to top
Crytiqal
Oct 22 2011, 02:34AM
  • e107 Support Team
Registered Member #53493
Joined: Oct 31 2009, 04:55AM
Location: Looks like a room...
Posts: 539
Moving on:

I am having difficulty adding a cellspacing when displaying all the Parents/Forums/subforums
This is just semantics, but I like to get it right the first time otherwise it will be more work to search exactly where the error is made.
I'll make an account on github so I can store all my code there and link to it when I need help on a particular problem.

In case you are interested which method I used to display subforums, here is a snippet of that section:


$sql2->db_Select("forum_f", "*", "WHERE forum_parent_id='".$forum_parent_id."' AND forum_forum_sub='0'", false);
while($row2 = $sql2->db_Fetch())
{
extract($row2);

$text .= " <tr>
<td><img src='".e_PLUGIN."forum/images/forums/".$forum_forum_id.".png' alt='' /></td>
<td>({$forum_forum_id})&nbsp;<a href='".$forum_forum_name."'>".$forum_forum_name."</a><br />".$forum_forum_description."";

// -----------------------------------------------------------------------------------+

if($sql3->db_Select("forum_f", "*", "WHERE forum_forum_sub='".$row2['forum_forum_id']."'", false) > 0)
{
while($row3 = $sql3->db_Fetch())
{
$subforums .= " ".$row3['forum_forum_name'].", ";
}

$subforums = rtrim($subforums, ', ');

$text .= " <br /><b>Subforums:</b>".$subforums."</td>
<td></td>
<td>
<a href='".e_SELF."?forums.edit.$forum_parent_id'><img title='edit' src='".img_path('admin_images/edit_16.png')."' alt='' /></a>
<a href='".e_SELF."?forums.delete.{$forum_parent_id}'><img title='delete' src='".img_path('admin_images/delete_16.png')."' alt='' /></a>
<a href='".e_SELF."?subforums.edit.$forum_forum_id'><img title='edit' src='".img_path('admin_images/forums_16.png')."' alt='' /></a>
</td>
</tr>";
}
else
{
$text .= " </td>
<td></td>
<td>
<a href='".e_SELF."?forums.edit.$forum_parent_id'><img title='edit' src='".img_path('admin_images/edit_16.png')."' alt='' /></a>
<a href='".e_SELF."?forums.delete.{$forum_parent_id}'><img title='delete' src='".img_path('admin_images/delete_16.png')."' alt='' /></a>
<a href='".e_SELF."?subforums.create.$forum_forum_id'><img title='create' src='".img_path('admin_images/sub_forums_16.png')."' alt='' /></a>
</td>
</tr>";
}

// -----------------------------------------------------------------------------------+

}


[ Edited Oct 22 2011, 02:39AM ]
Go to top
Crytiqal
Oct 27 2011, 10:37AM
  • e107 Support Team
Registered Member #53493
Joined: Oct 31 2009, 04:55AM
Location: Looks like a room...
Posts: 539
Subforums are done, next is to work on some code to make it possible to convert Subforums into Forums and vice versa. Should be done easily tomorrow .

I could use someone who can test my code and see if he/she can break it?

PM me please
Go to top
C6Dave
Oct 27 2011, 10:42AM
  • e107 Site administrator
  • e107 Support Team Leader
Registered Member #9506
Joined: Jul 31 2004, 12:57AM
Location: North East UK
Posts: 12379
I changed my subforums to forums via phpmyadmin to give them a 0 instead of another number i.e. 28, 34, 57 etc.

Should be easy to achieve via an admin option
Go to top
Website
Crytiqal
Oct 27 2011, 10:46AM
  • e107 Support Team
Registered Member #53493
Joined: Oct 31 2009, 04:55AM
Location: Looks like a room...
Posts: 539
Yea I guess it would, but I am going to watch some TV now, haha
Go to top
aomtealfox
Oct 27 2011, 10:12PM
Registered Member #7026
Joined: May 18 2004, 01:33PM
Location: Brussels, Belgium
Posts: 938
Crytiqal, what sort of testing do you need done?
Go to top
Website
Crytiqal
Oct 28 2011, 01:38AM
  • e107 Support Team
Registered Member #53493
Joined: Oct 31 2009, 04:55AM
Location: Looks like a room...
Posts: 539
A snippet:


Basicly, I want you to try to screw up the code by typing in (random) id and sub_id numbers into the URL and see if a wrong redirection is being done

If you could check the code itself aswell, to see if I am missing some things to prevent memory loss, that would be swell.
( Like $sql->db_Close() for example? Is this needed everytime and am I missing it somewhere? )


==========================================================
Functions so far:
PARENTS:
  • Creating and deleting of Parents
  • Creating of Parents with a selfsubmitted ID
    ( Type the ID behind the url and press enter to submit ID into form )
    !! If ID already exists, page will redirect to the editing of said parent
  • If Parent is removed, next incremental ID nr will not be skipping a number.

If you want to edit a parent with non-existing ID, page will redirect to creating of said parent.
If you want to remove a parent with non-existing ID, page will redirect to creating of said parent.


FORUMS:
  • Creating and deleting of Forums
  • Creating of Forums with a selfsubmitted ID
    ( Type the ID behind the url and press enter to submit ID into form )
    !! If ID already exists, page will redirect to the editing of said forum
  • If Forum is removed, next incremental ID nr will not be skipping a number.

If you want to edit a forum with non-existing ID, page will redirect to creating of said forum.
If you want to remove a forum with non-existing ID, page will redirect to creating of said forum.


SUBFORUMS:
  • Creating and deleting of Subforums
  • Creating of Subforums with a selfsubmitted ID
    ( Type the (SUB)ID behind the url and press enter to submit (SUB)ID into form )
    !! If (SUB)ID already exists, page will redirect to the editing of said subforum
  • If Subforum is removed, next incremental ID nr will not be skipping a number.

If you want to edit a subforum with non-existing ID, page will redirect to creating of said subforum.
If you want to remove a subforum with non-existing ID, page will redirect to creating of said subforum.

=====================================

I can provide a working DB example, images and ofcourse the code files.
[ Edited Oct 28 2011, 01:41AM ]
Go to top
Crytiqal
Oct 28 2011, 08:12AM
  • e107 Support Team
Registered Member #53493
Joined: Oct 31 2009, 04:55AM
Location: Looks like a room...
Posts: 539
Converting forums into subforums (provided they don't have subforums) is now working.

Converting subforums into forums is now working.

What would be the best way to handle deletion of a forum?
e.g. should the subforums also be deleted or converted into forums (upon "parent"forum deletion)?

Im going to work on recursivly deleting forums->subforums->threads->posts

If a parent gets deleted, all (sub)forums->threads->posts get deleted.

If a (sub)forum gets deleted, all (subforums->)threads->posts get deleted
If a thread gets deleted, all posts get deleted




EDIT:
Subforums now also retrieve the forum_parent_id from their parentforum.
This will make it easier to loop through when the parent gets deleted.

Not sure if I will keep it this way...
might not store a forum_parent_id for subforums. (Might make deletion of a parent a bit harder, but now it's using more memory/db-queries to create and edit subforums...

The extra code needed is this:

$sql->db_Select("forum_f", "*", "forum_forum_id='".$_POST['forum_forum_sub']."'");
$row = $sql->db_Fetch();
$_POST['forum_parent_id'] = $row['forum_parent_id'];


Otherwise the value will be 0 by default for the forum_parent_id in the subforums.
Deleting all forums from a parent then would require another loop to see if those forums themselves have subforums...

What do you guys think?
[ Edited Oct 28 2011, 03:14PM ]
Go to top
Crytiqal
Oct 29 2011, 04:56AM
  • e107 Support Team
Registered Member #53493
Joined: Oct 31 2009, 04:55AM
Location: Looks like a room...
Posts: 539
Working on recursivly deleting of parents and subforums.
Deleting of threads and posts will be in the frontend.


Here is an example of deleting a PARENT.
(The recursive deletion isn't finished yet, but the confirmation box is)

if(isset($_POST['delete_parent']))
{
if ($_POST['confirm'])
{
$sql->db_Delete("forum_p", "forum_parent_id='$id'");
mysql_query("ALTER TABLE e107_forum_p AUTO_INCREMENT = 1, ORDER BY forum_parent_id ASC") or die (mysql_error());
$sql->db_Close();
show_message(FORLAN_14);
$action = "main";
}
else
{
$forums = 0;
$subforums = 0;
$threads = 0;
$posts = 0;

$info = "<b>The forum parent has the following info:</b><br />";

if($sql->db_Select("forum_f", "forum_parent_id='{$id}'"))
{

$forums = $sql->db_Count("forum_f", "(*)", "WHERE forum_parent_id='{$id}' AND forum_forum_sub='0'");
$subforums = $sql->db_Count("forum_f", "(*)", "WHERE forum_parent_id='{$id}' AND forum_forum_sub!='0'");
$info .= "<b>".$forums." Forums<br /> ".$subforums." Sub-Forums</b><br /><br /><ul>";

$sql->db_Select("forum_f", "*", "forum_parent_id='{$id}' AND forum_forum_sub='0'");
while($row = $sql->db_Fetch())
{
unset($threads);
unset($posts);
$threads = 0;
$posts = 0;

if($sql2->db_Select("forum_t", "forum_forum_id='{$row['forum_forum_id']}'"))
{
$threads .= ".$threads." + $sql2->db_Count("forum_t", "(*)", "WHERE forum_forum_id='{$row['forum_forum_id']}'");

$sql2->db_Select("forum_t", "*", "WHERE forum_forum_id='{$row['forum_forum_id']}'");
while($row2 = $sql2->db_Fetch())
{
if($sql3->db_Select("forum_posts", "forum_thread_id='{$row2['forum_thread_id']}'"))
{
$posts .= ".$posts." + $sql3->db_Count("forum_posts", "(*)", "WHERE forum_thread_id='{$row['forum_thread_id']}'");
}
}
}

$info .= "<li>Forum ".$row['forum_forum_id']." [".$row['forum_forum_name']."] has ".$threads." threads, ".$posts." replies</li>";

// ---------------------------------------------------------------------------------------------+

$sql2->db_Select("forum_f", "*", "forum_parent_id='{$id}' AND forum_forum_sub='".$row['forum_forum_id']."'");
while($row2 = $sql2->db_Fetch())
{
unset($threads);
unset($posts);
$threads = 0;
$posts = 0;

if($sql3->db_Select("forum_t", "forum_forum_id='{$row2['forum_forum_id']}'"))
{
$threads .= ".$threads." + $sql3->db_Count("forum_t", "(*)", "WHERE forum_forum_id='{$row2['forum_forum_id']}'");

$sql3->db_Select("forum_t", "*", "WHERE forum_forum_id='{$row2['forum_forum_id']}'");
while($row3 = $sql3->db_Fetch())
{
if($sql4->db_Select("forum_posts", "forum_thread_id='{$row3['forum_thread_id']}'"))
{
$posts .= ".$posts." + $sql4->db_Count("forum_posts", "(*)", "WHERE forum_thread_id='{$row3['forum_thread_id']}'");
}
}
}

$info .= "<i>Sub-Forum ".$row2['forum_forum_id']." [".$row2['forum_forum_name']."] has ".$threads." threads, ".$posts." replies</i><br /><br />";
}

// ---------------------------------------------------------------------------------------------+

}

$info .="</ul>";
}

// ---------------------------------------------------------------------------------------------+

$confirm ="
<table>
<tr>
<td style='width:50%'>$info</td>
<td style='width:50%; text-align:center'><b>You cannot retrieve these once deleted!</b></td>
</tr>
</table>";
$ns->tablerender("", $confirm);

$text = "
<div style='text-align:center'>
<b>Confirm delete operation</b>
<br />
<form method='post' action='".e_SELF."?".e_QUERY."'>\n
<input type='hidden' name='e-token' value='".e_TOKEN."' />
<center><input class='button' type='submit' name='delete_parent' value='Confirm Delete' /> <input type='checkbox' name='confirm' value='1' /><span class='smalltext'> tick to confirm</span></center>
</form>
</div>";
$ns->tablerender("Confirm Delete", $text);

require_once(e_ADMIN."footer.php");
}
}
[ Edited Oct 30 2011, 04:18AM ]
Go to top
aomtealfox
Oct 29 2011, 05:27AM
Registered Member #7026
Joined: May 18 2004, 01:33PM
Location: Brussels, Belgium
Posts: 938
For the back-end I'm not your man, but lemme know when you want to start doing front-end stuff. I'm a great user for finding things that don't work
Go to top
Website
Crytiqal
Oct 30 2011, 04:19AM
  • e107 Support Team
Registered Member #53493
Joined: Oct 31 2009, 04:55AM
Location: Looks like a room...
Posts: 539
I will probably write a function for deleting
forums/subforums/threads and posts

aswell as write a function for informing about
forums/subforums/threads and posts
when confirming the deletion

and call that for each if($sql->db_Select());

Otherwise it's so much the same code that needs to be written.
[ Edited Oct 30 2011, 04:20AM ]
Go to top
Crytiqal
Oct 31 2011, 08:48AM
  • e107 Support Team
Registered Member #53493
Joined: Oct 31 2009, 04:55AM
Location: Looks like a room...
Posts: 539
I am done with the confirmation functions.
Next up will be the recursive deletion functions which shouldn't be too hard

EDIT:
How can I test the performance/optimization of my script compared to the current forum?
Refresh the page a few times and keep writing down the query info at the bottom? lol

EDIT2:
You can review the code at my github account @https://github.com/Crytiqal

EDIT3:
I still have a few unanswered questions; mainly regarding the deletion of a forum.
Should the subforum also be deleted or be converted into a real forum?

If no answer is given, Ill go ahead and delete everything. It would be the users own fault for not converting the subforums into forums beforehand.
[ Edited Oct 31 2011, 10:58AM ]
Go to top
MikeyGMT
Oct 31 2011, 11:03AM
MikeyGMT
  • e107 Site administrator
  • e107 Documentation Team Leader
Registered Member #5146
Joined: Dec 30 2003, 06:04AM
Location: Swansea, Surf City, Wales!
Posts: 1522
Performance, use wiki:e107 Debug (note to self: must add the debug to system test script for 0.8)

Review the sql execution times.
Any query over half second may need some attention.

However you will only really be able to test properly on a production sized instance. Could we import this forum into a test instance?
Go to top
Crytiqal
Oct 31 2011, 11:12AM
  • e107 Support Team
Registered Member #53493
Joined: Oct 31 2009, 04:55AM
Location: Looks like a room...
Posts: 539
Thanks MikeyGMT.

Also, about the testing I need done...

I just found a bug in my code:

When changing a forum to another parent, the new parent_id doesn't get updated into the subforums.

This is the kind of errors I am looking for to get found atm..
Any help in this area is appreciated, not only by me, but by every user of e107 who wants to use this forum in v0.8 .

EDIT:

Bug is crushed:

if(isset($_POST['update_forum']))
{
$_POST['forum_forum_name'] = $tp->toDB($_POST['forum_forum_name']);
$_POST['forum_forum_description'] = $tp->toDB($_POST['forum_forum_description']);
$sql->db_Update("forum_f", "forum_parent_id='{$_POST['forum_parent_id']}', forum_forum_name='{$_POST['forum_forum_name']}', forum_forum_description='{$_POST['forum_forum_description']}', forum_forum_class='{$_POST['forum_forum_class']}', forum_forum_postclass='{$_POST['forum_parent_postclass']}' WHERE forum_forum_id={$id}");

/* Sub-Forums */

$sql2->db_Select("forum_f", "*", "forum_forum_sub='{$id}'");
while($row2 = $sql2->db_Fetch())
{
$sql2->db_Update("forum_f", "forum_parent_id='{$_POST['forum_parent_id']}' WHERE forum_forum_sub='{$id}'");
}

mysql_query("ALTER TABLE e107_forum_f ORDER BY forum_forum_id ASC") or die (mysql_error());
$sql->db_Close();
$sql2->db_Close();
show_message(FORLAN_14);
$action = "edit";
}



PS: Anyone know how to replace the mysql_query("ALTER TABLE e107_forum_f ORDER BY forum_forum_id ASC") or die (mysql_error()); with a $sql->db_..... ??

Thanks in advance
[ Edited Oct 31 2011, 01:36PM ]
Go to top
Crytiqal
Nov 01 2011, 03:50AM
  • e107 Support Team
Registered Member #53493
Joined: Oct 31 2009, 04:55AM
Location: Looks like a room...
Posts: 539
I am stuck <_<.

The recursive deletion isn't working as the function code isn't executed.
Do I need some sort of return or something?

Here is what I have for deleting a parent:
lev.0: Open the parent
lev.1: - It first searches if the parent has forums

lev.2:-- It then searches if the forum has subforums
lev.3:--- It then searches if the subforum has threads
lev.4:---- It then searches if the threads have posts, and deletes them
lev.3:--- It then deletes the threads
lev.2:-- It then deletes the subforums

lev.1:-- It then searches if the forum has threads
lev.2:--- It then searches if the threads have posts, and deletes them
lev.2:-- It then deletes the threads
lev.1:- It then deletes the forums

lev.0: Delete the parent


// --------------------------------------------------------------------------------------------------+
// ------------------------------------------------------------------------ function del_parents() --+
// --------------------------------------------------------------------------------------------------+

function del_parents($parent_id)
{
global $sql, $sql2;

$sql2->db_Select("forum_f", "*", "forum_parent_id='$parent_id' AND forum_forum_sub='0'");
while($row2 = $sql2->db_Fetch())
{
del_forums($row2['forum_forum_id']);
}
mysql_query("ALTER TABLE e107_forum_f AUTO_INCREMENT = 1, ORDER BY forum_forum_id ASC") or die (mysql_error());
$sql2->db_Close();

echo "Parent ".$parent_id."";

$sql->db_Delete("forum_p", "forum_parent_id='$parent_id'");
mysql_query("ALTER TABLE e107_forum_p AUTO_INCREMENT = 1, ORDER BY forum_parent_id ASC") or die (mysql_error());
$sql->db_Close();
}


// --------------------------------------------------------------------------------------------------+
// ------------------------------------------------------------------------- function del_forums() --+
// --------------------------------------------------------------------------------------------------+

function del_forums($forum_id)
{
global $sql2, $sql3, $sql4;


// Recursivly select all sub-forums

$sql3->db_Select("forum_f", "*", "forum_forum_sub='$forum_id'");
while($row3 = $sql3->db_Fetch())
{
del_subforums($row3['forum_forum_id']);
}
mysql_query("ALTER TABLE e107_forum_f AUTO_INCREMENT = 1, ORDER BY forum_forum_id ASC") or die (mysql_error());
$sql3->db_Close();

// Recursivly delete all threads

$sql4->db_Select("forum_t", "*", "forum_forum_id='$forum_id'");
while($row4 = $sql4->db_Fetch())
{
del_threads_posts($row3['forum_forum_id']);
}
$sql4->db_Close();

$sql2->db_Delete("forum_f", "forum_forum_id='$forum_id'");
echo "Forum ".$forum_id."<br /><br />";

}


// --------------------------------------------------------------------------------------------------+
// ---------------------------------------------------------------------- function del_subforums() --+
// --------------------------------------------------------------------------------------------------+

function del_subforums($subforum_id)
{
global $sql3, $sql4;

// Recursivly delete all threads

$sql4->db_Select("forum_t", "*", "forum_forum_id='$subforum_id'");
while($row4 = $sql4->db_Fetch())
{
del_threads_posts($row4['forum_forum_id']);
}
$sql4->db_Close();

$sql3->db_Delete("forum_f", "forum_forum_id='$subforum_id'");
echo "Subforum ".$subforum_id."<br />";

}


// --------------------------------------------------------------------------------------------------+
// ------------------------------------------------------------------ function del_threads_posts() --+
// --------------------------------------------------------------------------------------------------+

function del_threads_posts($id)
{
global $sql4, $sql5;

// Recursivly delete all posts

$sql5->db_Select("forum_posts", "*", "WHERE forum_thread_id='$id'");
while($row5 = $sql5->db_Fetch())
{
$thread_id = $row5['forum_thread_id'];
$sql5->db_Delete("forum_posts", "forum_thread_id='$thread_id'");
echo "Found the posts<br />";
}
$sql5->db_Close();

$sql4->db_Delete("forum_t", "forum_forum_id='$id'");
echo "Found the threads<br />";
}


This outputs the following:

Subforum 3
Forum 2

Subforum 5
Forum 4

Forum 6

Forum 7

Parent 2


Which are the correct parent, forums and subforums (I don't have threads and posts yet).
But it won't delete any of these...

The function is called here:

if(isset($_POST['delete_parent']))
{
if ($_POST['confirm'])
{
del_parents($id);
show_message(FORLAN_14);
$action = "main";
}
}


How do I make the function run?
[ Edited Nov 01 2011, 10:56AM ]
Go to top
Crytiqal
Nov 01 2011, 04:00AM
  • e107 Support Team
Registered Member #53493
Joined: Oct 31 2009, 04:55AM
Location: Looks like a room...
Posts: 539
EDIT:
Anyone could provide me with a solution please?
[ Edited Nov 01 2011, 05:02AM ]
Go to top
MikeyGMT
Nov 01 2011, 12:17PM
MikeyGMT
  • e107 Site administrator
  • e107 Documentation Team Leader
Registered Member #5146
Joined: Dec 30 2003, 06:04AM
Location: Swansea, Surf City, Wales!
Posts: 1522
Reference:
PS: Anyone know how to replace the mysql_query("ALTER TABLE e107_forum_f ORDER BY forum_forum_id ASC") or die (mysql_error()); with a $sql->db_..... ??


Dont think it's valid to use ORDER BY in ALTER TABLE statement.
e107_forum_f should have a primary key index on forum_forum_id. By default the order will be ascending...
Use of ORDER BY should really only be needed in SELECT statements, and even then, use sparingly for performance, and ordinarily may not necessarily be a useful field to order data in all functional circumstances. Meaning you may want to order by date, or name or specific order rather than an internal id.
This is Oracle DB logic ... am sure MySQL wont be much different.
Go to top
Go to page  1 2 3 4 5  

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