List of information vswitch

How can I list the names of all the ports on my vswitches and vdses groups and VLANs they are labeled?

Thank you!

Try like this

Get-VirtualPortGroup |

Select Name,

@{N = 'Host'; E = {}

If ($_-is [VMware.VimAutomation.ViCore.Impl.V1.Host.Networking.DistributedPortGroupImpl]) {}

[channel]: join ("," (Get-View-Id $_.)) ExtensionData.Host - name of the property. %{$_. Name}))

}

else {}

Notice-EEG-Id $_. VMHostId | Select the name of ExpandProperty-

}}},

@{N = ' Type'; E = {}

If ($_-is [VMware.VimAutomation.ViCore.Impl.V1.Host.Networking.DistributedPortGroupImpl]) {}

"VDS".

}

else {"VSS"}}},

@{N = 'VlanId'; E = {}

If ($_-is [VMware.VimAutomation.ViCore.Impl.V1.Host.Networking.DistributedPortGroupImpl]) {}

if($_.) ExtensionData.Config.DefaultPortConfig.Vlan - is [VMware.Vim.VmwareDistributedVirtualSwitchPvlanSpec]) {}

$_. ExtensionData.Config.DefaultPortConfig.Vlan.PvlanId

}

ElseIf ($_.) ExtensionData.Config.DefaultPortConfig.Vlan - is [VMware.Vim.VmwareDistributedVirtualSwitchVlanSpec]) {}

if($_.) ExtensionData.Config.DefaultPortConfig.Vlan.VlanId - is [VMware.Vim.NumericRange []]) {}

[channel]: join (",", ($_.)) ExtensionData.Config.DefaultPortConfig.Vlan.VlanId | %{"$($_. Implementation)-$($_.) End)'}))

}

else {}

$_. ExtensionData.Config.DefaultPortConfig.Vlan.VlanId

}

}

}

else {$_.} VlanId}}}

Tags: VMware

Similar Questions

  • 12 Firefox just installed on MacBook Pro, OS x 106.8. FF looks great, seems faster too. BUT on the tab menu, the small triangle (to list the information on the tab) is missing;

    12 Firefox just installed on MacBook Pro, OS x 106.8. FF looks great, seems faster too. BUT on the tab menu, the small triangle (to list the information on the tab) is missing; I can't find a way to reinstall using view-> toolbars-> Customize option. Can you help me?

    You will see only the "List all tabs" button in Firefox 12 + if it has that many tabs open you get the scroll bar tab buttons appearing.

    Bug 714281 - show the tabs button only when tabs band overflows

  • Script to list the information under Configuration/Storage/datastore details

    Hello, I'm trying to create a script that returns the details data Configuration/Storage/Datastore/store info. The thing I want the script to do is list my ESX:s, data of list store names, list mpathpolicy and the details of the data store paths section in the VI client.

    Is it possible to get this in a script? Or if anyone knows how I can get information from the info of paths in Details of the data store to the VI client

    Thanks in advance

    This is possible if you use the SDK.

    The following script lists the name of host, name of DS, political path and the number of paths.

    If you need other information on the page of details in the report let me know.

    $report = @()
    
    Get-VMHost  | Get-View | %{
         $esx = $_
         $esx.Datastore | %{Get-View $_} | where {$_.SUmmary.Type -eq "VMFS"} | %{
                   $ds = $_
                   $ds.Info.Vmfs.Extent | %{
                        $ext = $_
                        $extKey = ($esx.Config.StorageDevice.ScsiLun | where {$_.CanonicalName -eq $ext.DiskName}).Key
                        $lun = $esx.Config.StorageDevice.MultipathInfo.Lun | where {$_.Lun -eq $extKey}
    
                        $row = "" | Select ESXname, DSname, "Path Selection","Paths Total"
                        $row.ESXname = $esx.Name
                        $row.DSname = $ds.Name
                        $row."Path Selection" = &{
                             switch($lun.Policy.Policy){
                                  "VMW_PSP_FIXED"{"Fixed"}
                                  "VMW_PSP_RR"{"Round Robin"}
                                  "VMW_PSP_MRU"{"Most Recently Used"}
                             }
                        }
                        $row."Paths Total" = $lun.Path.Count
                        $report += $row
                   }
         }
    }
    $report
    

    ____________

    Blog: LucD notes

    Twitter: lucd22

  • Pavilion laptop g7 lists different information after the registration of the first

    Can someone help me understand why my notebook lists a different model and the serial number through automatic detection he did when I signed everything first a year + ago?  It is a Pavilion g7-1150us, but lists another model g7t-1100 CTO. I had the motherboard replaced and I have a feeling that may be why, but if that is the case.  Thanks for any help that anyone can provide.

    Hello

    The g7-1100 is a series of many models including g7t-1100 models which are machines CTO. From 1100 to 1199, we can see 100 models, and we also see 11xxaa where aa represents normally for a country, a region, such as tx, nr... Back to your question, basically, they are very close. As mentioned, the Board of Directors has been replaced and restful can put available compatible / Board on your machine. I would not concern on this matter unless the other components/parts were exchanged.

    Kind regards.

  • Information on the package list

    Can someone explain how can we get the list of information on the package in oracle db

    Thanks in advance!

    In this case...

    SELECT *
    FROM   dba_objects
    WHERE  object_type = 'PACKAGE';
    

    See you soon

    Ben

  • How can I migrate my group with my address book lists?

    I moved from Windows XP to Ubuntu (YES!). I used TB on XP and I was able to pass my address book with all my contacts information by copying and pasting the abook.mab file. But I seem to have lost (or at least, I am currently out) the group lists that I had created using this address book. Where this information is stored and how it transfer to tuberculosis in Ubuntu? Is it as simple as a copy of another specific file or I have to extract and then import information from some files? These group lists were almost as important as the address book and I made the assumption (Yes, I know!) Group of the list of information to be part of the address book. Any help would be appreciated! Thank you!

    Problem solved: my bad! Group lists * are * actually there in the abook.mab file, there was just a small arrow next to the label of "Personal address book" that I had to click to view. Sorry about that.

    And I started digging a little further in the former #appdata # files and found a file called history.mab. I copied it in all, and now I have my "collected addresses" back too.

    Thank you for your time!

  • Unknown e-mail address shows on my contact list

    When I go to send or forward an email from my Hotmail account and click on the "to:" field, the contact list provides information for me to choose the contact, but there is an additional email address, the last on my list of contacts, that is on this list, but who is not and does not appear in my list of regular contacts.  I would like to remove this e-mail address. Help, please. Thank you!

    View all Windows Live and Hotmail questions in the appropriate forum found here:
    http://windowslivehelp.com/

  • Get information from my computer about the details of the graphics card and so on, in order to install games.

    From the control panel > Performance and tools > can't view and print details of the basis of the normal English Windows experience index. See below. This is what is displayed in Notepad.  The reason why I'm doing this is because I was not able to install Games 2/2, I bought. The guy at EB Games says print a list of information on the computer so that I could buy the appropriate game. I would like to have a game on my computer. My friend recommended to Doom 3. Is there something that exists and why I receive this report not readable?


    Check this similar thread:

    Printing performance information

    In the end, make sure that HKEY_CLASSES_ROOT\htafile\Shell\Open\Command is set to one of the following values, depending on the architecture of the operating system:

    x 64:
    c:\windows\syswow64\mshta.exe "%1" % *.

    x 86:
    c:\windows\system32\mshta.exe "%1" % *.

  • A Dell Inspiron 531 computer will be compatible with Windows 7? Conflicting information between sources.

    I looked on these contradictory information, and here's what I found... I'm still not sure about that.
    I found information about this Dell Inspiron 531 computergoing to be compatible with Windows 7 on the site of Microsoft and in the control panel of that computer system information.
     
    But then I found more information on the Dell website that indicates otherwise.
     
    Please follow me closely here, it took some time to compile this info.
     
    Allows first eliminate what would be the simplest solution I already tried, that would be the "Windows 7 Upgrade Advisor" located at this address: http://Windows.Microsoft.com/UpgradeAdvisor
     
    On this Web page, there is a small program to download and install that is supposed to tell me if this computer is compatible with Windows 7 in processor speed, RAM, graphics card, etc. and devices, automatically... Unfortunately, it does not work... I installed it and it stopped with the message: "Windows 7 advisor stopped working" so that program and this option is unnecessary.
     
     
    It is the "Windows 7 system requirements" list of information... it shows that I need at least a 1 GHZ processor or faster, 32-bit... This Inspiron 531 has a 2 GHZ processor and is 32-bit. This page is says I need 1 GB of RAM... it has 1 GB of RAM. It says I need 16 GB of available disk space, it has a C 138 GB primary hard drive which will be deleted when Windows 7 is ready to be installed. And he said that I need a"Graphics card DirectX 9 (with WDDM1.0 or higher driver)" ... the last part in parentheses is the only part that I'm not sure, but my system via the control panel information shows most of this information as being adequate.
     
    Go to this URL: http://support.dell.com/support/edocs/systems/inspd531/en/OM/appendix.htm#wp1149549 to see the Dell Inspiron 531 annex page online and click on the link above titled, 'Specifications' or just scroll to see... there in the category 4th down titled 'Video', it shows the "video integrated Nvidia (DirectX 9.0 Shader Model 3.9 Graphics Processing Unit) '. This seems to correspond to the above listed"DirectX 9" info page "Windows 7 system requirements".
       
    But then there are 2 pages Web of Dell, which indicate that this Dell Inspiron 531 is only supported by Windows Vista and Windows XP... see this URL for this Web page... http://support.dell.com/support/topics/global.aspx/support/osmatrix/index?c=us&cs=19&l=en&s=dhs& ~ ck = mn  
     
     
    It shows, once you scroll down just a bit, a list of the current Dell computers that can support Windows 7... the Inspiron 531 is not on this list.
    This list excludes the Inspiron 531, but it then says' does not have a computer on these lists? Click here to shop for a new Dell! » .. .bad grammar side, this line that I'm pointing out may just be trying to sell me a new Dell computer, if I actually need or not Dell
    !
     
    And finally my info the computer from the control panel shows aprocessor 2 GHZ, 1 GB of RAM or 958 MB anyway and the 32 bit OS.
     
    And Yes, I ran the built-in diagnostic test Dell PSA on this computer and when it tests the sound card and the speakers, he plays the song a bit in each channel and then on both channels, so I know that the material is good on this computer.
    I know it's a lot to go through... it took me a while to compile this info, and I sent a version of this letter with screenshots and other MS Tech in India who I worked with for a month on the phone and email to correct a problem of 'no sound' that simply cannot be beat.
    But I'm trying to make sure before I do a clean install of Windows 7, when the disc arrives here, I don't clean it hard drive alone to experience Windows 7 does not work on this machine.
    Actually, I'm a Mac user and I don't have much trouble in those... Just trying to fix the computer of my mother for it, and now it seems that trying to install Windows 7 is the only way to get the sound back so that my mom can enjoy some music again.
    I never thought that I would like to know as well on the PC troubleshooting I've learned in the last month, but I don't like, and there is still no sound on this computer and everything has been tried... I made a collage of a hundred different error messages from Windows that I think I'll put it up for bid on ebay... I just want to go home to my trusty Macs.
     
    Please give me your comments... I would of course welcome.
    Thank you
    NuMetro

    I am happy that you have it installed, but you have sound?

    I was too surprised when Windows 7 to install all my drivers in device for me!

    The video driver that it wanted to install was even later that of Nvidia. Also, it does not have the driver Physx I needed, so I had to install one myself. The other driver, that he has not installed was the pilot for the X - Fi card. He did install my motherboard if chipset drivers, but I turned around and installed ones that came with my motherboard.

    Windows 7 does a better job to settle on earlier versions of Windows, but do not watch install what he wants to make sure that it does not have something that you don't want. He came along and updated my video driver again, but when that happens, it installs just the driver itself and not the driver Physx and my video control panel. Now when he talks about video drivers, I just go to Nvidia and download the full set.

    You have the option in there for Windows Update to select which updates you want to allow. I would have put to allow you to decide which ones you want and do not let do it on his own.

    I'm glad you're a happy camper! I do not see where you come with Vista, I jumped on this operating system completely because of the horror stories I've heard.

  • Host via PowerCLI hardware information

    Hello

    I have a list of information that I would like to get some of our guests.  I tried this pulling in PowerGUI and the VMWare Powerpack, but I'm having a problem with the fact that it will only cut down material information for one of the hosts (even if I have 40 hosts connected tab managed hosts).

    I obviously have a lot to learn in PowerCLI but I was hoping someone could provide advice on that.

    I have a list of hosts that I have to connect you with a built-in account and I want to pull down the following information in a CSV file or some sort of report:

    Host name

    Manufacturer / model

    Type of processor

    Number of CPUS / cores

    Processor speed

    CPU used

    Total memory

    Memory used

    ESXi version

    All of the above information is avalible in PowerGUI, but like I said I can it fire only one host at a time for some reason any.

    If possible, I'd like to be able to get the list of virtual machines on each host courses at the same time.

    I'd like some tips on it or maybe if someone has a little more experience with PowerGUI and could let me know why it will only fill the information for all my listed top host is.

    I found a few examples, I think I could crush all but I con ' t find a way to define a name of user and password specific and did draw a list of hosts rather than one at a time.

    It would be great if someone had a similar script built and would allow me to take a peek.

    Thanks for any help you can lend.  I really appericiate this community.  =)

    Once you get the hang of the present, it becomes very easy.

    In your case, you want to enumerate all your ESXi hosts and some properties for each host.

    The basic idea is to use the Get-VMHost cmdlet.

    Like that, it will return all ESXi servers in the vCenter which are connected.

    Get-VMHost

    On the screen, you will see a number of default properties. This is determined by a kind of file format, but leave for the time being.

    The above cmdlet returns an object that has the more properties. To display all the properties to do a Get-Member

    Get-VMHost | Get-Member

    The next step is to choose yourself which properties are to be displayed.

    To do this, you use the cmdlet Select-Object, something like this

    Get-VMHost | Select name, Build, ConnectionState

    If you want to store the result in a file, you can use for example the Export-Csv cmdlet.

    Get-VMHost | Select name, Build, ConnectionState | Export Csv C:\report.csv - NoTypeInformation - UseCulture

    If you want to learn more about the parameters that can be used on a cmdlet, you can use the Get-Help cmdlet.

    For example

    Get-Help Export-Csv-parameter NoTypeInformation

    help on this specific parameter. But you can also view the complete with help

    Export-Csv-full get-Help

    It is actually the basic concept behind the generation of reports PowerCLI/PowerShell;

    • get items
    • has chosen what you want to display
    • to save the results to a file

    This will help you on your way to start?

  • Vcenter list, name of the cluster, the details of the data store, exported to CSV

    I would like to be able to list the details of the data store for 12 vcenters (vcenter, data store space free in the UK, used in GB, GB total) but I'm new to powershell. I found a lot of scripts that lists similar information, but without the Vcenter. Anyone know where I can find a script for this?

    Something like that

    foreach($vc in $defaultVIServers){
        Get-Datastore -Server $vc |     Select @{N="vCenter";E={$vc.Name}},       Name,       CapacityMB,       FreeSpaceMB,       @{N="UsedSpaceMB";E={$_.CapacityMB - $_.FreeSpaceMB}}
    }
    
  • List of connections of Console Active with PowerCLI

    Does anyone know of a way to check the number of connections to the active console to a virtual machine using PowerCLI?  I know that it is possible for the list connection events that have taken place in the past, but is it possible to check the current status of connections?  I wrote a Powershell script to launch a console connection to a virtual machine remotely but would if ensure that there is no active connection already open on the selected virtual machine.  I already put the value of RemoteDisplay.MaxConnections = 1 in the VMX files to limit active connections to one.  Thanks in advance for any help.

    Hello-

    I don't know, a list with information about active connections, but there is at least one property that keeps the _count_ of active connections.  The property 'Runtime.NumMksConnections' of the View of a VM object .net held this indictment:

    PS C:\> Get-VM myVM | Get-View -Property Name,Runtime.NumMksConnections | select Name,@{n="NumConn"; e={$_.Runtime.NumMksConnections}}
    Name       NumConn
    ----       -------
    myVM       1
    

    So, you can check out this charge, pmassey, and if it is '-eq 0 ", then launch the connection...

  • List tablespace.

    Hello

    Please one of you help me witih this requirement.

    I want to list the tables, tablespace used, index, index tablespace used & number of lines

    Concerning
    Ravikumar.A

    If you want the complete list of information in a single query, it's here

    Select T.Table_Name,t.num_rows,T.Tablespace_Name,T1.Column_Name,T2.Index_Name, T3.Tablespace_Name
    From User_Tables T, User_Tab_Cols T1, User_Ind_Columns T2, User_Indexes T3
    Where  t.table_name=T1.Table_Name
    And T1.Column_Name=T2.Column_Name
    and T2.Index_Name=T3.Index_Name;
    

    It would generate detailed report in bulk with table, columns and indexes. I suggest you use different queries to generate required information.

  • Show only user information after the connection

    Hello world

    I hope someone can help me please, I'm new to databases and programming.

    OK, I just created my first page of the login of the user (using the dreamweaver builtin functions).  Nowi have successfully built a MySQL database, insert a table with username, userPass and e-mail.  The login page works correctly and redirects to the authorized page

    Now, this is where I get lost.  On the authorized page, I want that it lists the information related to that user only, IE display their username and your email address.  What I can't work.  I'm sure you must filter to show only the logged-in user, but I can't see anything at all.

    Help, please

    My login page

    <?php require_once('Connections/connection.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
    {
      $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;    
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      }
      return $theValue;
    }
    }
    mysql_select_db($database_connection, $connection);
    $query_users = "SELECT * FROM tbl_users";
    $users = mysql_query($query_users, $connection) or die(mysql_error());
    $row_users = mysql_fetch_assoc($users);
    $totalRows_users = mysql_num_rows($users);
    ?><?php
    // *** Validate request to login to this site.
    if (!isset($_SESSION)) {
      session_start();
      if (isset($_POST['userName'])) {$_SESSION['userName'] = $_POST['userName'];}
    }
    $loginFormAction = $_SERVER['PHP_SELF'];
    if (isset($_GET['accesscheck'])) {
      $_SESSION['PrevUrl'] = $_GET['accesscheck'];
    }
    if (isset($_POST['username'])) {
      $loginUsername=$_POST['username'];
      $password=$_POST['password'];
      $MM_fldUserAuthorization = "";
      $MM_redirectLoginSuccess = "index.php";
      $MM_redirectLoginFailed = "login.php";
      $MM_redirecttoReferrer = false;
      mysql_select_db($database_connection, $connection);
      
      $LoginRS__query=sprintf("SELECT userName, userPass FROM tbl_users WHERE userName=%s AND userPass=%s",
        GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text")); 
       
      $LoginRS = mysql_query($LoginRS__query, $connection) or die(mysql_error());
      $loginFoundUser = mysql_num_rows($LoginRS);
      if ($loginFoundUser) {
         $loginStrGroup = "";
        
        //declare two session variables and assign them
        $_SESSION['MM_Username'] = $loginUsername;
        $_SESSION['MM_UserGroup'] = $loginStrGroup;       
        if (isset($_SESSION['PrevUrl']) && false) {
          $MM_redirectLoginSuccess = $_SESSION['PrevUrl']; 
        }
        header("Location: " . $MM_redirectLoginSuccess );
      }
      else {
        header("Location: ". $MM_redirectLoginFailed );
      }
    }
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <form id="form1" name="form1" method="POST" action="<?php echo $loginFormAction; ?>">
      <label>User Name:
      <input type="text" name="username" id="username" />
      </label>
      <p>
        <label>Password:
        <input type="password" name="password" id="password" />
        </label>
      </p>
      <p>
        <label>
        <input type="submit" name="submit" id="submit" value="Submit" />
        </label>
      </p>
    </form>
    </body>
    </html>
    <?php
    mysql_free_result($users);
    ?>
    
    

    My page authorized

    <?php require_once('Connections/connection.php'); ?>
    <?php
    //initialize the session
    if (!isset($_SESSION)) {
      session_start();
    }
    // ** Logout the current user. **
    $logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
    if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
      $logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
    }
    if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
      //to fully log out a visitor we need to clear the session varialbles
      $_SESSION['MM_Username'] = NULL;
      $_SESSION['MM_UserGroup'] = NULL;
      $_SESSION['PrevUrl'] = NULL;
      unset($_SESSION['MM_Username']);
      unset($_SESSION['MM_UserGroup']);
      unset($_SESSION['PrevUrl']);
     
      $logoutGoTo = "login.php";
      if ($logoutGoTo) {
        header("Location: $logoutGoTo");
        exit;
      }
    }
    ?>
    <?php
    if (!isset($_SESSION)) {
      session_start();
    }
    $MM_authorizedUsers = "";
    $MM_donotCheckaccess = "true";
    // *** Restrict Access To Page: Grant or deny access to this page
    function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) { 
      // For security, start by assuming the visitor is NOT authorized. 
      $isValid = False; 
      // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. 
      // Therefore, we know that a user is NOT logged in if that Session variable is blank. 
      if (!empty($UserName)) { 
        // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. 
        // Parse the strings into arrays. 
        $arrUsers = Explode(",", $strUsers); 
        $arrGroups = Explode(",", $strGroups); 
        if (in_array($UserName, $arrUsers)) { 
          $isValid = true; 
        } 
        // Or, you may restrict access to only certain users based on their username. 
        if (in_array($UserGroup, $arrGroups)) { 
          $isValid = true; 
        } 
        if (($strUsers == "") && true) { 
          $isValid = true; 
        } 
      } 
      return $isValid; 
    }
    $MM_restrictGoTo = "login.php";
    if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {   
      $MM_qsChar = "?";
      $MM_referrer = $_SERVER['PHP_SELF'];
      if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
      if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0) 
      $MM_referrer .= "?" . $QUERY_STRING;
      $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
      header("Location: ". $MM_restrictGoTo); 
      exit;
    }
    ?><?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
    {
      $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;    
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      }
      return $theValue;
    }
    }
    $colname_Recordset1 = "-1";
    if (isset($_SERVER['MM_Username'])) {
      $colname_Recordset1 = $_SERVER['MM_Username'];
    }
    mysql_select_db($database_connection, $connection);
    $query_Recordset1 = sprintf("SELECT * FROM tbl_users WHERE userName = %s", GetSQLValueString($colname_Recordset1, "text"));
    $Recordset1 = mysql_query($query_Recordset1, $connection) or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    $totalRows_Recordset1 = mysql_num_rows($Recordset1);
    ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <p align="center">WELCOME <strong><?php echo $row_Recordset1['userName']; ?></strong>,</p>
    <p align="center">IF YOU ARE VIEWING THIS PAGE THEN YOU HAVE SUCCESSFULLY LOGGED IN</p>
    <p align="left"> <a href="<?php echo $logoutAction ?>">Log out</a></p>
    </body>
    </html>
    <?php
    mysql_free_result($Recordset1);
    ?>
    

    You have selected the wrong option in the fields of the Recordset dialog box filter. You have chosen Server Variable. It is expected the Session Variable.

  • Help the release of the two column list

    Hello
    I have two columns from two different tables. How can I write a query to list the information in a column of result?

    I have
     TABLE A              TABLE B
    _Column A_          _Column B_
        a                    d
        b                    e                 
        c                    f
    What I want is
    RESULT_COLUMN
          a
          b
          c
          d
          e
          f
    Any help appreciated here

    Thank you

    Select column_a table_a
    Union
    Select table_b column_b;

Maybe you are looking for