Jump to content

Recommended Posts

hi sry my english

 

database tablename>params_field(TEXT)

values:

menu_image=-1

pageclass_sfx=ssss

print=

back_button=

name=1

position=1

email=0

 

$row=mysql_fetch_array

 

$myparam1 = $row['']['pageclass_sfx='];

 

how do this action.

 

plz help me.

 

this class use in joomla mosParameters class.

 

Link to comment
https://forums.phpfreaks.com/topic/137071-php-mysql-parameter-load/
Share on other sites

Couldn't work out what your table name was..

 

<?php

$query = mysql_query("SELECT * FROM tablename");
while ($row = mysql_fetch_array($query)) {

    $myparam1 = $row['pageclass_sfx'];
    // do whatever else

}

?>

 

That's the basics of it.. In that example though for each record returned it would overwrite the $myparam1 variable.

 

A

//* params field value:

param1=page

param2=menu

param3=content

*/

mysql_connect('localhost', 'root', 'root');

mysql_select_db('testparams');

 

$qry = "SELECT params FROM params";

$act = mysql_query($qry);

 

$row = mysql_fetch_array($act);

 

$params = $row['params'];

$salga = explode("\n", $params);

$char = '$';

$var = $char.$salga['0'];

 

if($var=='page') {

echo 'ok';  // not work :D

}

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.