Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6353183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:21:59+00:00 2026-05-24T22:21:59+00:00

This is my code: <?php require_once ‘../../../jq-config.php’; // include the jqGrid Class require_once ABSPATH.php/jqGrid.php;

  • 0

This is my code:

<?php
require_once '../../../jq-config.php';
// include the jqGrid Class
require_once ABSPATH."php/jqGrid.php";
// include the driver class
require_once ABSPATH."php/jqGridPdo.php";
// Connection to the server
$conn = new PDO(DB_DSN,DB_USER,DB_PASSWORD);
/    / Tell the db that we use utf-8
$conn->query("SET NAMES utf8");

// Create the jqGrid instance
$grid = new jqGridRender($conn);
// Write the SQL Query
$grid->SelectCommand = 'SELECT p.product_id, p.product_title, p.product_image1_t2, pc.product_cat_name, b.brand_name FROM ' . DB_PRODUCTS .'  p INNER JOIN ' . DB_PRODUCT_CATS . ' pc ON p.product_cat_id=pc.product_cat_id LEFT JOIN ' . DB_BRANDS . ' b ON b.brand_id=pc.product_cat_brand_id';
// set the ouput format to json
$grid->dataType = 'json';
// Let the grid create the model from SQL query
$grid->setColModel();
// Set the url from where we obtain the data
$grid->setUrl('grid.php');
// Set alternate background using altRows property
$grid->setGridOptions(array(
    "rowNum"=>10,
    "sortname"=>"product_id",
    "rowList"=>array(10,20,50),
    "height"=>'auto',
    "grouping"=>true,
    "groupingView"=>array(
        "groupField" => array('brand_name'),
        "groupColumnShow" => array(true),
        "groupText" =>array('<b>{0}</b>'),
        "groupDataSorted" => true

    ) 
    ));
// Change some property of the field(s)
$grid->setColProperty("product_id", array("label"=>"NO", "width"=>60));
$grid->setColProperty("brand_name", array("label"=>"BRAND"));
$grid->setColProperty("product_title", array("label"=>"PRODUCT NAME"));
$grid->setColProperty("product_cat_name", array("label"=>"CATEGORY"));
$grid->setColProperty("product_image1_t2", array("label"=>"PRODUCT PHOTO"));
// Enjoy
$grid->renderGrid('#grid','#pager',true, null, null, true,true);
$conn = null;
?>

So, I get my whole data succesfully but, when i call this file I see in “product_image1_t2” (PRODUCT PHOTO) grid just my file’s name for example :
“image_file.jpg”. I want to show the image something like what that shows

<img src="myfile.jpg" alt="my_file.jpg" />

Already check the manual but dont understand, so i’m a newbie on jquery…

Can u help me on this example how to do that?
Here you can see the current result:

http://oi55.tinypic.com/11qolsz.jpg

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T22:22:00+00:00Added an answer on May 24, 2026 at 10:22 pm

    Check out the JQGrid forum, there are several threads discussing how to integrate images in the grid, like this one or here on SO, image column in jqGrid?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm learning by reading this tutorial: Link Here's the code: <?php require_once 'Zend/Loader.php'; class
Sample Code: Config.php: class Config { public $serverIP = 1.1.1.10; } DB.php: require_once /home/mysite/PHP/Config.php;
Consider the following PHP code: <?php require_once(myDBclass.php); class a { private $tablename; private $column;
In one PHP file, I have this code: require_once $_SERVER['DOCUMENT_ROOT'] . '/custom/functions.php'; global $testVar;
I have made a code -- <?php header(Content-type: text/javascript); require_once('../php/config.php'); $domail_theme = $_GET['theme']; ?>
I have this testing code in PAGE A : <?php require_once('../mysite/php/classes/eventManager.php'); $x=new EventManager(); $y=$x->loadNumbers();
I have the following class code in PHP: <?php require_once CUSTOM_PATH . DIRECTORY_SEPARATOR .
I just saw this code while studying the wordpress source code (PHP), You can
I have this code in PHP. It connects to the DB fine, but pops
I need help to use jConfirm with this existing code (php & Jquery &

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.