hi all. is it possible to obtain from the table the last review of the material, knowing the material ID in a mysql table?					
									5 replies
						
						9 years ago						
					
				May I don't understand your question. But if you know ID of an entry, you can use JLex Review module to retrieve latest reviews.
			
					
						
						9 years ago						
					
				hi all. is it possible to obtain from the table the last review of the material, knowing the material ID in a mysql table?
			
					
						
						9 years ago						
					
				In other words. Can I get the last review through the API if you know the record ID? (Not using module) i.e. embed code in the template output K2 for example and get the latest review on the fly!
			
					
						
						9 years ago						
					
				You can use this syntax to get latest review based on ID k2:
For MySQL: SELECT * FROM #__jlexreview WHERE `object`="k2" AND `object_id`={ID} ORDER BY created DESC (!! Replace #_ by your database prefix).
--------
For Joomla embed code:
$db = JFactory::getDBO ();
$query = $db->getQuery (true);
$query->select ("*")->from ("#__jlexreview")->where ("object='k2' AND object_id={ID}")->order ("created DESC");
$rows = $db->setQuery ($query,0,10)->loadObjectList ();
--->> $row is an Object has review property -->> Continue your code -->>
---------
p/s: I recommend you should use JLex Review module, because you can use some trick to add this module anywhere.
			
					For MySQL: SELECT * FROM #__jlexreview WHERE `object`="k2" AND `object_id`={ID} ORDER BY created DESC (!! Replace #_ by your database prefix).
--------
For Joomla embed code:
$db = JFactory::getDBO ();
$query = $db->getQuery (true);
$query->select ("*")->from ("#__jlexreview")->where ("object='k2' AND object_id={ID}")->order ("created DESC");
$rows = $db->setQuery ($query,0,10)->loadObjectList ();
--->> $row is an Object has review property -->> Continue your code -->>
---------
p/s: I recommend you should use JLex Review module, because you can use some trick to add this module anywhere.
						
						9 years ago						
					
				thanks for reply!
			
					Reply to 
	
	
Product Changelogs
Product Changelogs
                JLex Comment
                3.5.1
            
            
                Upgrade is required for Joomla 6. You also need to update its modules and plugins.            
        
                JLex GuestBook
                2.0.1
            
            
                ^ Added dark mode in the backend.
# Fixed the issue of not being able to save the settings.
# Compatible with J5 & 6.
        # Fixed the issue of not being able to save the settings.
# Compatible with J5 & 6.
                Youtube Feed Pro
                6.0.3
            
            
                # Redesign themes
# Optimize source code (reduce 35%)
# Optimize processing time
# Dark Mode in the admin section
# Support for changing thumbnail size.
# Compatible with Joomla 5.4.x and 6.
        # Optimize source code (reduce 35%)
# Optimize processing time
# Dark Mode in the admin section
# Support for changing thumbnail size.
# Compatible with Joomla 5.4.x and 6.
                JLex Transfer
                1.3.7
            
            
                ^ Support dark mode in the backend.
# Fixed bug when importing user list.
        # Fixed bug when importing user list.
                JLex Comment
                3.4.8
            
            
                ^ hCaptcha integration.
^ Read-only mode.
^ Hide all comments of entry.
^ Dark mode for admin.
# Improved default theme.
            
        ^ Read-only mode.
^ Hide all comments of entry.
^ Dark mode for admin.
# Improved default theme.
                JLex Block
                6.0.3
            
            
                # Important: Upgrade required to be compatible with Joomla 5 (B/C plugin).
# Fixed conflicts with system plugins.
        # Fixed conflicts with system plugins.
                JLex Attachments
                1.4.4
            
            
                ^ Drag & drop file to upload
^ Sortable file list
        ^ Sortable file list
 
								