Calling functions within an echo in PHP/Mysqli statement

I have a table written in php that is filled with a mysqli result set.

It draws on the table and it fills from the result set table, as below, using a properly figurative connection:

<? PHP / * DRAWN AS AN ARRAY * /.

echo "< table border = 0 > ';

While ($row = mysqli_fetch_array ($resultset, MYSQLI_NUM))

/ * $s = (date (a/m/Y ", strtotime ($row [1])"))-it's the conversion of reference * /.

echo "< tr > < td > $row [0]: $row [4]: $row [2] < table >.

< td rowspan = 15 >

< img = name-"picspot\" src =------------.

width =------"300\" height =-"240\" alt =------"image."

$row [10] >

< table >

< /tr >

< b >

< td > pictured: $row [1] < table > / * < td > pictured: $s < table > * /

< /tr >

/ * more lines go here * /.

< /table >.

? >

Copy the following code works properly and produced a table in the correct format and value with the data in the table as shown:

table1.JPG

$row [1] contains a timestamp in the format 2003-10-17 00:00:00 and prints it in the table next to the word "photo".

I need to convert this date using something like:

$s = (date (a/m/Y ", strtotime ($row [1])"))

If I include this in the echo statement it prints only the above function instead of the date.

If I do the conversion date immediately after the stated time, and then include

< td > pictured: $s < table > instead of < td > pictured: $row [1] < table >

that works very well, but he kills as all the other outputs of the $resultset table.

table2.JPG

I'm obviously something wrong, but can not understand.

Run out of two calls to the application and storing the first $row [1] in a variable, converting it to a date and by printing on a second print request run, looks like overkill, I can't find a solution.

Can you?

All suggestions welcome.

Howard Walker

After much research, I had to resort to a second query as follows:

$getID = mysqli_fetch_assoc (mysqli_query ($conn, "SELECT photodate FROM table WHERE ref = $t"));

$pdate = $getID ["photodate"];

$pdate = (date (a/m/Y ', strtotime ($pdate)));

.

.

.

On the photo: $pdate

produce a correct output.

Moral - if you work in this long enough there are take a way!

Have fun!

Howard Walker

Tags: Dreamweaver

Similar Questions

  • Calling functions PHP FB

    I have a project where I need to call specific PHP functions, but I'm having some trouble.

    I can call and execute PHP script, but not an individual function.

    How to call functions that exist within a PHP script?

    You can use AMFPHP. Here is an article that leads to an explanation of pdf:

    http://blogs.Adobe.com/mikepotter/2006/02/flex_and_php_us.html

    or you can google.

  • Calling a function within a symbol?

    Hello

    I am one of these flash devs who try to get edge animate to do what I usually do in Flash, so I could do this the wrong way, but I have a symbol with an "inner" function on my scene, and I want to call this function from the scene.

    I tried to use () .getStage () sym.getComposition ().getSymbol("symbolName").functionName; but it does not work.

    I have no problem handling the symbol itself by calling the . play() or . hide() so I know the path work... someone can show me the proper syntax to call a function within a symbol?

    THX in advance

    Hi Abnesher,

    An important principle to grasp is that symbols (and the stadium is one of them) is located in parallel, despite instances of different symbols, nested one inside the other (and all ultimately nested in the scene).

    The consequence is that from the inside of your nested symbol, you have no direct visibility of the function defined inside the step symbol!

    Inside of the symbol of the step , in the document.compositionReady event handler:

    sym.yourGlobalFunction = function (firstParameter)

    {

    your stuff

    }

    Inside another symbol, in one of its event handlers:

    sym.getComposition () .getStage () .yourGlobalFunction (5);

    Gil

  • Insert a special character such as apostrophes with PHP/Mysql

    Hi friends,

    I have a problem with php/mysql. I created a form vach'inton a page php with dreamweaver and when I try to fill in the form with a string that contains an apostrophe ('), I got an error. It seems that integration is not possible. Would you have any idea for that. I give you the code of dreamweaver php and thank you for your help.

    <? php require_once('Connections/Mainconnect.php');? >

    <? php require_once('Zend/Date.php');? >

    <? PHP

    If (! function_exists ("GetSQLValueString")) {}

    function GetSQLValueString ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")

    {

    If (via PHP_VERSION < 6) {}

    $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":

    If ($theValue =="")

    {

    $theValue = "NULL";

    }

    on the other

    {

    $zendDate = new Zend_Date($theValue,"dd/MM/yyyy");

    $theValue = "" "." $zendDate-> toString("yyyy-MM-dd"). »" « ;"

    }

    break;

    case "set":

    $theValue = ($theValue! = "")? $theDefinedValue: $theNotDefinedValue;

    break;

    }

    Return $theValue;

    }

    }

    $editFormAction = $_SERVER ['PHP_SELF'];

    If (isset {}

    $editFormAction. = « ? ». htmlentities($_SERVER['QUERY_STRING']);

    }

    If ((isset($_POST["MM_update"])) & & ($_POST ["MM_update"] == "form1")) {}

    $updateSQL = sprintf ("UPDATE pers_soc_reg SET Field1 = %s, Field2 = %s,

    GetSQLValueString ($_POST ["field1"], "text").

    GetSQLValueString ($_POST ["Field2"], "double"));

    Hello friends,

    I solved the problem.

    The problem is a free extension for dreamweaver called 'check new items' of Felixone. After his retirement, all forms of work without problem.

    Thanks to you all.

  • AS3 / PHP / MySQL - login form

    Hello

    I am creating the simplest example I can an AS3/PHP/MySQL interaction.  I want a Flash animation to check login/pass a user against a database.  I tested the PHP code and know that it is correct.  The problem must lie in his.  I traced everything to make sure that it shuts down correctly, but it is up under the names of variable $user, $passer... and some of the other garbage... not the values of the variables I wait... see below.

    The PHP code returns correctly what follows when tested in the browser: user = dan & pass = danpass & err = success!

    The variable traces $user, $pass, $err return the following Flash:

    undefined

    $pass

    $err ';


    echo $returnString;


    }


    ? >

    The following ActionScript code:

    import flash.events. *;

    import flash.net.URLLoader;

    import flash.net.URLRequest;

    import flash.net.URLVariables;

    import flash.net.URLRequestMethod;

    logbtn.addEventListener (MouseEvent.CLICK, login)

    function login ($e:MouseEvent) {}

    var myVariables:URLVariables = new URLVariables();

    var myRequest:URLRequest = new URLRequest ("login.php");

    myRequest.method = URLRequestMethod.POST;

    myRequest.data = myVariables;

    var myLoader:URLLoader = new URLLoader;

    myLoader.dataFormat = pouvez;

    myLoader.addEventListener (Event.COMPLETE, completeHandler);

    myVariables.user = loguser.text;

    myVariables.pass = logpass.text;

    myLoader.load (myRequest);

    function completeHandler(event:Event):void {}

    trace (Event.Target.Data.User);

    trace (Event.Target.Data.Pass);

    trace (Event.Target.Data.Err);

    }

    }

    And here is the PHP:

    <? PHP

    include_once "dbconnect.php";

    $user = $_POST ['user'];

    $pass = $_POST ['pass'];

    $sql = mysql_query ("SELECT * FROM users WHERE user = ' $user ' AND pass = '$pass'");

    $check = mysql_num_rows ($sql);

    If ($check > 0) {}

    $row = mysql_fetch_array ($sql);

    $user is $row ['user'];.

    $pass is $row ['pass'];.

    $err = ' Success! ';

    $returnString = "user = $user & pass = $pass & err = $err;

    echo $returnString;

    }

    ? >

    Nothing stands out as incorrect?  I went on that for probably 10 or 15 hours trying different variations, tweaks and reduce complexity.  Really, I'd appreciate any help you can offer!  Thank you.

    -Eric

    Hello

    you load the php file in the same folder, or localhost (running the SWF in a browser)?

    If being run from localhost, your system could deliver rather than run php scripts

  • Unknown column in the PHP/MySQL field list

    I created a feedback form for our airshow site and it works great. I now create some pages of the review, which are also working well, then

    ... I decided to improve one of the review pages and now it does not work... sigh.

    We ask stakeholders to provide their zip code and I have a vision showing the number of responses by postcode, this works very well and can be seen here http://www.hollisterairshow.com/feedback-results.php , so I decided to improve it by adding the City / State based on zip code. I created a new table called 'postcodes' and imported a list of zip codes and city / state info - all the 42,000 + of them.

    The PHP/MySQL, who works is illustrated below

    <? PHP
    Connect MySQL

    $query = "SELECT zip, COUNT (zip) ZIP GROUP BY feedback";

    $result = mysql_query ($query) or die (mysql_error ());

    Print results
    While ($row = {mysql_fetch_array ($result))}
    echo $row ["zip"]. " ". $row ['COUNT (zip)'];
    echo "< br / > ';
    }
    ? >

    As I am now faced with two tables, I thought that I had to add the name of the table in any field, so I added the names of tables and fields to the new table so

    I changed the PHP / MySQL as follows

    <? PHP
    Connect MySQL

    $query = 'SELECT feedback.zip, COUNT (feedback.zip), zipcodes.citystate OF feedback codes postal WHERE feedback.zip = zipcodes.zipcode GROUP BY feedback.zip';

    $result = mysql_query ($query) or die (mysql_error ());

    Print results
    While ($row = {mysql_fetch_array ($result))}
    echo $row ['feedback.zip']. " ". $row ['COUNT (feedback.zip)']. " ". $row ['zipcodes.citystate'];
    echo "< br / > ';
    }
    ? >

    and it fails when I run it says ' Unknown column 'feedback.zip' in "field list '"

    I would be grateful any suggestion on this, I am new on this PHP/MySQL stuff.

    Thank you

    Tony

    Tables listed in the From clause must be separated by commas. As it is, it is evaluated as an alias.

  • PHP/MySql error message

    I posted this before and didn't get the answer I need, probably because I didn't post all my codes. I use PHP/MySql.  I created a Web site that has several forms.  When I conducted three of the forms, I get the below error messages:

    You have an error in your SQL syntax; consult the manual for your version of the MySQL server for the right syntax to use near ' condition, length, color, city, 'State', Email, Photo) VALUES ('29 ', ' 4',' used "in line 1.)

    I write the codes below.  I hope this time that I posted everything I should have so that I can get help.

    FORM

    < form action = "<?" PHP echo $editFormAction;? ">" method = "POST" enctype = "multipart/form-data" name = "individual" class = 'individual' id 'individual' = >
    < table width = "594" border = "0" class = "test" >
    < tr > < /tr >
    < b >
    < td width = "166" class = 'td' > view < table > title
    < td colspan = "3" > < span id = "sprytextfield1" >
    < label >
    < input name = "Display title" type = "text" class = "test" id = "Display title" size = "35" / >
    < / label >
    < span class = "textfieldRequiredMsg" > required </span > < / span > < table >
    < /tr >
    < b >
    < td = 'td' class > price < table >
    < td colspan = "3" > < span id = "sprytextfield2" >
    < label >
    < input name = "price" type = "text" class = 'test' id = 'price' size = '35' / >
    < / label >
    < span class = "textfieldInvalidFormatMsg" > Invalid format. </span > < / span > < table >
    < /tr >
    < b >
    < class td = 'td' > < table > format
    < td colspan = "3" > < label >
    < select name = "size" = "1" multiple = "multiple" class = 'test' id = 'size' >
    < option > 0 < / option >
    < option > 2 < / option >
    < option > 4 < / option >
    < option > 6 < / option >
    < option > 8 < / option >
    < option > 10 < / option >
    < option > 12 < / option >
    < option > 14 < / option >
    < option > 16 < / option >
    < option > 18 < / option >
    < option > 20 < / option >
    < option > 22 < / option >
    < option > 24 < / option >
    < option > 26 < / option >
    < / select >
    < / label > < table >
    < /tr >
    < b >
    < class td 'td' = > status < table >
    < td colspan = "3" > < label >
    < select name = "Condition" class = 'test' id = 'State' >
    < option > new < / option >
    < option > used < / option >
    < / select >
    < / label > < table >
    < /tr >
    < b >
    < class td 'td' = > length < table >
    < td colspan = "3" > < label >
    < select name = "Length" class = 'test' id = 'Length' >
    Long < option > < / option >
    Short < option > < / option >
    < option > mid-length < / option >
    < / select >
    < / label > < table >
    < /tr >
    < b >
    < class td 'td' = > color < table >
    < td colspan = "3" class = 'td' > < span id = "sprytextfield5" >
    < label >
    < input name = "Color" type = "text" class = "test" id = "Color" size = "35" / >
    < / label >
    < span class = "textfieldRequiredMsg" > required </span > < / span > < table >
    < /tr >
    < b >
    < class td 'td' = > city < table >
    < class td = 'td' > < span id = "sprytextfield4" >
    < label >
    < input name = "City" type = "text" class = 'test' id = 'City' size = "35" / >
    < / label >
    < span class = "textfieldRequiredMsg" > required </span > < / span > < table >
    < class td = 'td' > < table >
    < class td = 'td' > < table >
    < /tr >
    < b >
    < class td 'td' = > status < table >
    < td colspan = "3" > < label >
    < select name = "State" class = 'test' id = 'State' >
    < option > AL < / option >
    < option > AK < / option >
    < option > AZ < / option >
    < option > AR < / option >
    < option > CA < / option >
    < option > CO < / option >
    < option > CT < / option >
    < option > OF < / option >
    < option > DC < / option >
    < option > FL < / option >
    < option > GA < / option >
    < option > HI < / option >
    ID < option > < / option >
    < option > HE < / option >
    IN < option > < / option >
    < option > HERE < / option >
    < option > KS < / option >
    < option > KY < / option >
    < option > THE < / option >
    < option > ME < / option >
    < option > MD < / option >
    < option > MY < / option >
    < option > e < / option >
    < option > MN < / option >
    < option > MS < / option >
    < option > MO < / option >
    < option > MT < / option >
    < option > NOT < / option >
    < option > NV < / option >
    < option > NH < / option >
    < option > NJ < / option >
    < option > NM < / option >
    < option > NY < / option >
    < option > NC < / option >
    < option > ND < / option >
    < option > OH < / option >
    < option > OK < / option >
    < option > OR < / option >
    < option > PA < / option >
    < option > LAUGHED < / option >
    < option > SC < / option >
    < option > SD < / option >
    < option > TN < / option >
    < option > TX < / option >
    < option > c < / option >
    < option > VT < / option >
    < OPTION > < / option >
    < option > WA < / option >
    < option > WV < / option >
    < option > WI < / option >
    < option > WY < / option >
    < / select >
    < / label > < table >
    < /tr >
    < b >
    < class td 'td' = > Email < table >
    < td colspan = "3" > < span id = "sprytextfield3" >
    < label >
    < input name = "Email" type = "text" class = "test" id = "Email" size = "35" / >
    < / label >
    < span class = "textfieldRequiredMsg" > required </span > < span class = "textfieldInvalidFormatMsg" > Invalid format. </span > < / span > < table >
    < /tr >
    < b >
    < height = "26" td class = 'td' > confirm Email < table >
    < td colspan = "3" > < span id = "spryconfirm1" >
    < label >
    < input name = "Confirm Email2" type = "text" class = 'test' id = 'confirm Email2"size ="35"/ >
    < / label >
    < span class = "confirmRequiredMsg" > required </span > < span class = "confirmInvalidMsg" > the values don't match. </span > < / span > < table >
    < /tr >
    < b >
    < height td = '26' class = 'td' > photo (s) < table >
    < td colspan = "3" > < label >
    < input name = "Photo" type = 'file' class = 'test' id = 'Photo' size = "35" / >
    < / label > < table >
    < /tr >
    < b >
    < height = '131' td class = 'td' > < table > Details
    < td colspan = "3" > < label >
    < textarea = cols "Additional Details" name = "40" lines "6" = class = 'test' id = "Détails" > < / textarea >
    < / label > < table >
    < /tr >
    < /table >
    < p >
    < label >
    < input name = "Submit" type = 'submit' class = 'test' id = "Submit" value = "Post" / >
    < / label >
    < /p >
    < input type = "hidden" name = "MM_insert" value = "individual" / >
    < / make >

    SERVER BEHAVIOR


    If (! function_exists ("GetSQLValueString")) {}
    function GetSQLValueString ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
    {
    If (via PHP_VERSION < 6) {}
    $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 "set":
    $theValue = ($theValue! = "")? $theDefinedValue: $theNotDefinedValue;
    break;
    }
    Return $theValue;
    }
    }

    $editFormAction = $_SERVER ['PHP_SELF'];
    If (isset {}
    $editFormAction. = « ? ». htmlentities($_SERVER['QUERY_STRING']);
    }

    If ((isset($_POST["MM_insert"])) & & ($_POST ["MM_insert"] == "individual")) {}
    $insertSQL = sprintf ("INSERT INTO donations (postingTitle, 'size', condition, length, color, city, 'State', email, photo) VALUES (%s, %s %s, %s, %s, %s, %s, %s, %s)", ")
    GetSQLValueString ($_POST ["'validation title"], "text").
    GetSQLValueString ($_POST ['size'], "text").
    GetSQLValueString ($_POST ["State"], "text").
    GetSQLValueString ($_POST ['Length'], "text").
    GetSQLValueString ($_POST ['Color'], "text").
    GetSQLValueString ($_POST ['city'], "text").
    GetSQLValueString ($_POST ["State"], "text").
    GetSQLValueString ($_POST ['Email'], "text").
    GetSQLValueString ($_POST ['Photo'], "text"));

    @mysql_select_db ($database_bridesmaidsrack_db, $bridesmaidsrack_db);
    $Result1 = mysql_query ($insertSQL, $bridesmaidsrack_db) or die (mysql_error ());

    $insertGoTo = "donations.php";
    If (isset {}
    $insertGoTo. = (strpos ($insertGoTo, '?'))? « & » : « ? » ;
    $insertGoTo. = $_SERVER ['QUERY_STRING'];
    }
    header (sprintf ("location: %s", $insertGoTo));
    }

    CONNECTION TO THE BASE


    # FileName = "Connection_php_mysql.htm"
    # Type = 'MYSQL '.
    # HTTP = 'true '.
    $hostname_bridesmaidsrack_db = "localhost";
    $database_bridesmaidsrack_db = "bridesmaidsrack";
    $username_bridesmaidsrack_db = "";
    $password_bridesmaidsrack_db = "";
    $bridesmaidsrack_db = mysql_pconnect ($hostname_bridesmaidsrack_db, $username_bridesmaidsrack_db, $password_bridesmaidsrack_db) or trigger_error (mysql_error (), E_USER_ERROR);

    OK, so your initial problem was the condition of the word, because it is a reserved word for MySQL.

    Here is a list of the reserved words.

    http://dev.MySQL.com/doc/refman/5.1/en/reserved-words.html

    If you use a reserved word, you must place the accents around it like this...

    "condition."

    then MySQL knows you use it as a standard Word and he interprets not as command.

    OK now on the following problem.

    'Photo' column cannot be null

    When you have created your table in MySQL tells you that the photo field can not be empty. If you are forcing people to add a photo, then you need to do the checked field before the script runs / inserts. If you're ok with them NOT to add a photo, then you have to allow NULL values for this field in your table. This is a function that you would normally control via PHP MyAdmin or other MySQL database management software.

    Now, the last question:

    The Dynamic (form.action...) attribute is just how the FIELD itself will appear in SB (Server Behaivors) who is not the insertion of a plug.

    Record insertion as I said probably disappeared because some how you two when you shouldn't have one. So when we removed a DW (Dreamweaver) now think his party but is not. This can sometimes be corrected by opening the page again and closing or manually set or remove all SB side code, and then add the insertion of a plug anywhere. But at least you know what was the original problem so you can fix it after add it again.

  • CS4-generated statements of PHP/MySQL

    I built a simple GUI program 2 in CS4 using PHP and MySQL. A program accepts XHTML form user entry of two text fields, which are then sent to the B program for treatment and subsequent recovery of MySQL. I'd like a clairification on the MySQL statement that CS4 generates the Recordset, I built.

    Here is the PHP instructions that define the variables passed in program B:

    $colname1_Recordset1 = "";
    If (isset($_POST['transaction_mfgr_importer'])) {}
    $colname1_Recordset1 = $_POST ['transaction_mfgr_importer'];
    }
    $colname2_Recordset1 = "";
    If (isset($_POST['transaction_model'])) {}
    $colname2_Recordset1 = $_POST ['transaction_model'];
    }

    Here is the generated recordset based on this entry:

    @mysql_select_db ($database_DGRconnect_acquisition, $DGRconnect_acquisition);
    $query_Recordset1 = sprintf ("SELECT * FROM dgr_ad_vendor_acquisition WHERE dgr_ad_vendor_acquisition.transaction_mfgr_importer = %s dgr_ad_vendor_acquisition.transaction_model = %sAND", GetSQLValueString ($colname1_Recordset1, "text"), GetSQLValueString ($colname2_Recordset1, "text") "");
    $Recordset1 = mysql_query ($query_Recordset1, $DGRconnect_acquisition) or die (mysql_error ());
    $row_Recordset1 = mysql_fetch_assoc ($Recordset1);
    $totalRows_Recordset1 = mysql_num_rows ($Recordset1);
    ? >

    I have highlighted in red the parts of the statement generated in which my questions. Basically, I would like to know how the '%s' is generated to represent the two variables, and especially, how they are analyzed so that they are differentiated in the statement. In other words, how the engine keep track which is '%s '? I hope that my first question is about as clear as mud!

    Secondly, is there a way I can handle both of these variables to work in a 'LIKE' operand, against the '=' one?

    $query_Recordset1 = sprintf ("SELECT * FROM dgr_ad_vendor_acquisition WHERE dgr_ad_vendor_acquisition.transaction_mfgr_importer LIKE %s %s dgr_ad_vendor_acquisition.transaction_model AND AS ", GetSQLValueString ($colname1_Recordset1, "text"), GetSQLValueString ($colname2_Recordset1, "text") "");

    I'd rather change my original return to enjoy the relative comparison function that normally the LIKE operand. I want that the resulting lines retrieved from SELECT it to include anything similar that the registration of the user. Normally, the LIKE comparison requires a string hardcoded, for example. ' WHERE dgr_ad_vendor_acquisition.transaction_mfgr_importer LIKE '% General Electric '... '. ". I'm trying to find a way to replace the variable representations '%s' with the contents of $colname1_Recordset1 and respectively$colname2_Recordset1.

    Thank you for your time, and any comments would be greatly appreciated!

    Timbo9799 wrote:

    I came to the conclusion that MySQL correctly don't evaluate not the LIKE statement unless a comparison hard-coded string is used.

    You came to an erroneous conclusion.

    When you create the SQL query in the Recordset dialog box advanced, insert your variable name surrounded by % like this:

    SELECT column1, column2
    FROM myTable
    WHERE column1 LIKE %col1%
    AND column2 LIKE %col2%
    

    Dreamweaver CS4 then converts two %s variables and puts the wildcards within the GetSQLQueryString() like this:

    $query_myRecordset = sprintf("SELECT column1, column2 FROM myTable
    WHERE column1 LIKE %s AND column2 LIKE %s",
            GetSQLValueString("%" . $col1_myRecordset . "%", "text"),
            GetSQLValueString("%". $col2_myRecordset . "%", "text"));
    
  • Error 1 occurred Armijo rule stepsize reduction failed to reduce the value of function within the maxiters

    Hello

    I try to use the VI of unconstrained optimization to fit a measured spectrum. However, each call VI, I get the error:

    Error 1 occurred Armijo rule stepsize reduction failed to reduce the value of function within the maxiters

    Possible reasons:

    LabVIEW: An input parameter is not valid. For example if the input is a path, the path can contain a character not allowed by the operating system such as? or @.
    =========================
    NOR-488: Command requires controller GPIB be in Charge.

    Does anyone know what I'm doing wrong and how I can fix this problem?

    The VI for the stepsize Armijo rule reduction can be found here:

    \vi.lib\gmath\NumericalOptimization\qn_armijo rule stepsize reduction.vi

    In the current implementation, the spectrum is able to a rectangular spectrum. This may be the cause of the error?

    I have attached the screw that I use. They are written in LabVIEW 2010.

    Thanks Marc67 for your quick reply, but I found the error.

    It was pretty stupid, that I used a bad vector of departure for the unconstrained optimization VI, which was too low values.

  • Records of the TWG visible to other functions within a session?

    Hello! My TWG (global temporary Table) was created with ON COMMIT DELETE ROWS;

    My question suppose that several pl\sql functions called by ODP.NET can run within a single session because of connection pooling.
    Is this the right hypothesis?

    I was unable to catch it again but did not exclude the possibility that records inserted into a global temporary Table with a
    function 'slow' may be visible to another function ("fast") before the problems of slow function a COMMIT. Worth, a quick function can
    issue VALIDATION until the slow end actually destroying records in a TWG.

    Am I correct in my assumptions that the data of the TWG can be removed if another function within a session issues a COMMIT?

    Sorry in advance, but I'm going through after the first part of my question in the ODP.NET forum as well.

    Many thanks in advance,

    user549560 wrote:
    Thank you, Tubby. I'm fairly certain that I can cover multiple threads in a web environment each get a connection grouped each execution of a function that uses the TWG.
    I think that it might be the situation where a function may inadvertently delete the documents that belong to another function. I doubt that I can run in a way completely series, unless
    Experts on this forum can tell me otherwise?

    Published by: user549560 on May 8, 2013 16:20

    I think perhaps you are getting confused however. The mandate of a connection pool is give a connection when asked and remove it from the pool so no other resource uses.

    So if you had "multiple threads" in your 'client' which would translate to the X pool connections. Each connection is a dedicated Oracle session. So if you have 3 "threads" you have 3 sessions of Oracle, as I said before... I'm sure that there is no way for a pool of connections to give you 2 connections to the same session (until this session is returned to the pool, of course, I speak of overlap here).

    The only way "where a function may inadvertently delete the documents that belong to another function" is when the two functions are called in the same SESSION of ORACLE.

    And you program in general for this. You provide a service that is atomic, one that does not rely on the client calling X routines before hand and hope, while hoping the client continues win the lottery and get the correct pool of connections Oracle session (because your process is based on the TWG or package global variables, and a specific state that has been defined for example). If you have a situation where you have to go back and forth between the client and the database (client must process the data of the 1 function call in order to feed the function call 2 for example) during several connection pool connections, then you program for it using things like the overall application contexts.

    It all comes down to management and the definition of the transaction. YOU need to reach this output so that the customer knows call 1 single routine is a transaction and if you and the customer agree that you have need of a return in the way I described above, then YOU must extended that out as well, and design for this.

    I can assure you that Oracle session X will never see a session Oracle Y. TWG data unless you manage to break the database and find a horrible bug that is :)

    See you soon,.

  • Question about a view inline or function within SQL

    Hi all


    I would like to know if using a view inline with a sql query is better or a call of function within the sql query is preferable.

    When I check the plan explained in both cases I see no difference in the cost.

    Appreciate your valuable suggestions on this.


    Thank you
    Maddy K.

    A function of a query will be worse than an inline view, given the context of switching between SQL and PL/SQL engines.

    See http://asktom.oracle.com/pls/apex/f?p=100:11:0:P11_QUESTION_ID:60122715103602
    Bonus http://www.oracle.com/technetwork/database/features/plsql/overview/doing-sql-from-plsql-129775.pdf

  • PHP/MySQL Parse error: syntax error, unexpected T_VARIABLE the meantime

    I am new to web programming and I'm testing my first PHP/MySQL of HTML data request.

    Already, I get the following error in the analysis:

    Parse error: syntax error, unexpected waiting T_VARIABLE... on line 7.

    Simple code is:

    <? PHP

    $pwd = $_POST ["password"];
    $dbn = $_POST ['database_name'];
    $hnm = $_POST ["hostname"];

    $link_id = mysql_connect ($hnm, $dbn, $pwd);       This is line 7 where I get the error message
    If (isset ($link_id))
    {
    $result = mysql_list_dbs ($link_id);
    echo $result;
    mysql_select_db("hppumps",$link_id);
    $result = mysql_list_tables("hppumps",$link_id);
    echo $result;
    $result = mysql_list_fields ("hppumps", "models");
    echo $result;
    $rows = mysql_affected_rows ($result);
    If ($rows < 1) {echo "error.  Registration has not been added to the database. « ;}
    else {echo "$rows response (s) has been added to the database." ;}}
    }
    on the other
    {
    echo "error.  You were unable to connect to the MySql database";
    }
    ? >

    ANY HELP WITH THIS WOULD BE GREATLY APPRECIATED!

    marcusinfla wrote:

    If it is an exact copy of your code, the problem here and not on the 7 line.

    Do not space between the question mark and the php. The opening PHP tag should look like this:

    		   
  • Recommend utility PHP/MySQL

    To save time, I am looking to buy application development software / tool box compatible with php / mysql.  One of the features I'm looking for is a upload of php via form upload script file. I know that the DMX box has separate program they sell.  Ideally I'd like a tool that does more than simply a function and not with a price high.

    If you could recommend some products, it would be appreciated.

    George

    When it comes to using a reasonable price "required no additional coding" software code generation PHP/MySQL, I ve always been very happy with PHPMAKER - but it is worth mentioning that there are many other tools out there as well who may meet your needs better than this so just one, google for "php code generator" to get a general idea about available today.

    See you soon,.

    Günter

  • How can I get the data in the foreign key?  PHP/mysql

    I managed to create registration, log-in and results pages appear for accounts of client with PHP/Mysql/Dreamweaver 8. I have another page for more information to be contained in a child table, I used the Insert Wizard to create. I can't make it work. I get either a foreign key cannot be null error or a foreign key constraint.

    If I include the foreign key in the form on the page, I can manually enter the appropriate identification number, and it works. How to automatically enter the id into the foreign key column?

    I got the authentication of users using e-mail, password and user type.

    Thanks for your help

    When someone connects, Dreamweaver creates a session variable called $_SESSION ['MM_Username"]. Use this session variable to create a recordset object to get the ID of the user, who can then be entered in the child table's foreign key field.

    Dreamweaver automatically updates the code for recordsets immediately above the DOCTYPE declaration, then you will need to move above the code for the server behavior insert record. So it must be in the following order:

    1. Recordset to get the user ID
    2. Insert the record to the child table
  • In PHP, MySQL, MEASURE date manipulation

    I have a datetime stored in MySQL I recover from the operation of update uninstall via the following statement:

    $last_date = KT_escapeForSql ($tNG-> getColumnValue ("last_kpi_gen_date"), $tNG-> getColumnType ("last_kpi_g en_date"));

    Now, I want to add 1 day, 7 days, or a month to date.  I try to use mktime but it seems he wants it in order of date different (h, m, s, a-m-j), I tried the strtotime function and the function date to reformat the $last_date, but it doesn't seem to work.

    Is there an easy way to add days to a date variable extracted from a database of MySQL using uninstall getColumnValue?

    Hi, I'm doing this way:

    You can CHECK for MySQL with time + 8 hours:

    create view DATETIME as
    SELECT DATE_FORMAT (DATE_ADD (now (), 8 HOURS APART), '%A - %m - %j % H: % i: %s') as DT_add8hour;

    Or with + 8 days:

    create view DATETIME as
    SELECT DATE_FORMAT (DATE_ADD (now (), 8 DAYS APART), '%A - %m - %j % H: % i: %s') as DT_add8day;

    This option stores CURRENT time value allways more apart. So you can use this update another table colums duration you want. Works perfectly with DW + MEASUREMENT + PHP + MySQL

    Here are several Date and time functions

    I hope this helps you!

    Post edited by: asdaf1234

Maybe you are looking for