Joomla uses value of name attribute along with a prefix (prefix_valueOfnameAttribute) to generate Id of the field in case there is not id attribute provided.
If you add id attribute in your xml then this provided id is automatically gets added to the form field.
prefix mentioned above is the argument which you pass while getting Form instance.
That practice would actually be terrible for SEO. You would be hurting your search content by regularly replacing content on the same id. Aside from that, even if you did reuse the ids, they would still continue to get larger,but at a slower rate. This is because you wouldn't have access to ids that are smaller than the last remaining id.
Ex: if you have ...
The first problem is that you're using joomlausers->id which doesn't look correct. It should be $joomlausers->id (with a $ at the beginning).
Secondly, loadObjectList() returns an indexed array of PHP objects, so I don't believe in_array will work with this.
Instead, I'd suggest using $db->loadColumn(), which will return an array of all userid's, ...
I don't think it is very direct to filter the result set when sql is perfectly qualified to do such logic.
As Lodder corrected, you also need to use setQuery(), fix your missing $, adjust your result set generating method call, and improve your redirect technique.
I've included some helpful diagnostic lines to help you to understand the query that is being ...
In both cases you should access the article's object id property. By the way, do note that JRequest is deprecated.
For the article, in your article template you can add next to the article's title the:
For the category blog title, we are actually talking about the same (as the blog layout is looping through the articles of a ...
If the input requires an ID you should place it in the .xml also, e.g:
<field name="report" type="foreignkey" class="inputbox"
I don't know what the documentations says, but the truth is that I haven't see the menu item id in the details page for a while, although it used to exist there ( I remember it in Joomla 2.5, below the template style field).
However, you can always find the item id of the menu item you are editing, from the url, at the browser's address bar.
The url will ...
There is a relevant discussion here, but in short it just concludes that using the jdatabase insertid method is just as rubbish as mysqli_insert_id.
Joomla DB Insert, how to get last inserted id?
The trick is to do a select using fields that you already have from the insert query, eg. get max id & match the userid, or any other fields that you might ...
This is actually a pure MySQL question which should be titled "How to Alter a MySQL column". There is nothing different or special if the database is used for a Joomla site.
So simply to have this part of the question answered, a SQL statement like below would do it:
ALTER TABLE `YOUR_DATABASE`.`#__users`
CHANGE COLUMN `id` `id` VARCHAR(50) NOT NULL ;
You could use something like the following:
var querystring = 'affiliate=12345';
var href = $(this).attr('href');
href += (href.match(/\?/) ? '&' : '?') + querystring;