How to use the character (%) wild for php/DW research?

I am trying to create a search engine that searches in the database to print documents on the basis of several criteria defined by the user.

DW uses sprintf() to compile the MySQL query.

I have my attempts to find a portion of a string that should come back to something like -'% xyz %' to give results like "xyzabc abc'"

But as sprintf uses %s defined by the user to take the values of '%' is a special character.

I tried to use: % s %%, / % s/%, \%%s\%, but nothing works. There is no error, but the php page opens not at runtime.

How to find a sub string in the database using the query written in php using sprintf?

All Solutions?

pp140 wrote:

I am trying to create a search engine that searches in the database to print documents on the basis of several criteria defined by the user.

DW uses sprintf() to compile the MySQL query.

I have my attempts to find a portion of a string that should come back to something like -'% xyz %' to give results likexyabc abc'

As you have discovered, sprintf() using %s as a placeholder for the string. The % wild card must be in your channel. It is an example of my book for Dreamweaver CS4:

$query_getAuthors = sprintf("SELECT first_name, family_name FROM authors  WHERE first_name LIKE %s OR family_name LIKE %s ORDER BY family_name ASC",     GetSQLValueString("%" . $colname_getAuthors . "%", "text"),     GetSQLValueString("%" . $colname2_getAuthors . "%", "text"));

Two instances of %s in the sprintf() function are replaced by the values passed to GetSQLValueString(). In both cases, the wildcard character is concatenated to the variable passed as the first argument of GetSQLValueString().

Tags: Dreamweaver

Similar Questions

  • How to use the different start for the resolution of specific device screen

    How to use different splash Screen for the resolution of specific device in Webworks for Smartphone.
    Please suggest me the solution.

    The BB10, you can use the element of the rim: splash:

    https://developer.BlackBerry.com/HTML5/documentation/rim_splash_element.html

  • How to use the function @RETURN for poster messages Essbase in 11.1.2.1

    Hello

    I found the business support Essbase Hyperion Planning 11.1.2.1 @RETURN rule novelty.

    If I create a simple BR for planning app like below:
    "@RETURN ("test return message,"WARNING);
    Validation returns error and BR can not be deployed.

    One is how to use the function @RETURN br?

    Thank you!

    He probably should be in a calco for example block

    "Profit".
    (
    ....
    )

    It is more likely to be used with an IF ELSE command, you do not want to define the condition for the calculation, roughly what the feature is designed for output.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • How to use the copy utility for app from one server to another

    Hello
    I use hyperion 9.3.1 and I want to synchronize two applications on different server, I know how to use the utility to copy of app, but on the same server, I think that we can also use this utility to copy the application from one server to another using the properties file but I dnt know how to do it because the example is SQL and I am using and database oracle
    can you guys please help.

    Published by: sharad sapra on March 31, 2011 11:33

    Hello

    1. create a property file (this example is relevant if you have a repository of ORACLE, you can find more information in http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/html_hp_admin/frameset.htm?ch09s01s01.html]):

    SOURCE_APP_JDBC_CATALOG = SOURCE_APP
    SOURCE_APP_JDBC_DRIVER = Hyperion.JDBC.Oracle.OracleDriver
    SOURCE_APP_JDBC_URL = jdbc:hyperion:oracle://RepositoryDatabaseServer; SID = DatabaseSID
    SOURCE_APP_JDBC_USERNAME = schemaName
    SOURCE_APP_JDBC_PASSWORD = schemaPassword
    SOURCE_APP_JDBC_DATABASE_TYPE = ORA
    SOURCE_APP_OLAP_SERVER = olapServerName:port
    SOURCE_APP_OLAP_USERNAME = olapUserName
    SOURCE_APP_OLAP_PASSWORD = olapUserPassword
    SOURCE_APP_OLAP_APPNAME = SOURCE_APP

    TARGET_APP_JDBC_CATALOG = TARGET_APP
    TARGET_APP_JDBC_DRIVER = Hyperion.JDBC.Oracle.OracleDriver
    TARGET_APP_JDBC_URL = jdbc:hyperion:oracle://RepositoryDatabaseServer; SID = DatabaseSID
    TARGET_APP_JDBC_USERNAME = DatabaseSchemaName
    TARGET_APP_JDBC_PASSWORD = DatabaseSchemaPassword
    TARGET_APP_JDBC_DATABASE_TYPE = ORA
    TARGET_APP_OLAP_SERVER = olapServerName:port
    TARGET_APP_OLAP_USERNAME = olapUserName
    TARGET_APP_OLAP_PASSWORD = olapUserPassword
    TARGET_APP_OLAP_APPNAME = TARGET_APP

    2. open CMD and type copyapp /S:yourSourceAppName T:yourTargetAppName P:yourPropertiesFileName.properties /L:yourLogFileName.log

    Once the migration has been successful, you must update your users using the UpdateUsers.cmd (UpdateUsers.cmd and PlanningUserName PlanningUserPassword TARGET_APP).

    I hope this helps...

    Kind regards
    André

  • How to use the activation code for creative photography cloud

    Hi all

    I'm trying the rest of photography cc, and now I use the activation code, I found in my new camera. The problem is that I am not able to do. When I try to buy the 1 year subscription, it asks for my credit card and I don't have the option to insert the activation code.

    I tried to go into "plans & products", on my account, but there is no way to get the activation code...

    How to activate the rest of photography?

    Thanks in advance

    Hello

    We can see: -.

    How activate/redeem redemption Adobe CC Code

    Hope this Helps

  • How can I learn how to use the effects affect for the 1st time?

    Download to help me with the aftect effect: 'Now Playing' for my movie maker. I'm frustrated b/c I don't know how to use it.

    I see that Rick has already you linked to my favorite updated resource on the way, but I wanted to warn you that EI is not a very easy to learn program. It's a real pleasure once you know what you're doing, but it will take a few months before you really understand how to use it - and it'll take a lifetime to master. It is a very powerful program, and as such, it has a steep learning curve.

    Do not expect to pick up in a day.

  • How to use the object Handle for Image cropping and rotation

    I downloaded the handle of the rogue 2,008 object that I need to know how to use it for cropp and rotate the Image.

    Contact the vendor of this product for more information on its use.

  • How to use the control host for creating folders

    I want to create a folder called abc in my C drive using forms 6i.
    How can I do this by using the Host command?
    Host('MD C:\ABC');
    

    François

  • How to use the Pivot function for range group in oracle SQL

    Hello

    Hello!!!

    I need to display the data in the format below. There are 2 columns 1 is State and another is rate.

    State < 100 100-199, 200-299 300-399 400-499, 500-599 600-699 700-799 800-899 900-999 > = 1000 Total
    AK 1 2 0 4 1 4 4 35 35 4 1 25
    AL 0 0 2 27 10 17 35 2 2 35 0 103
    AR 0 0 1 0 0 2 2 13 13 2 0 6
    AZ 0 1 2 14 2 14 13 3 3 13 0 57
    CA     0     0     1     6     2     7     3     4     4     3     0     34

    Developed the sub query but unable to use the beach on the pivot function. Please help on this.

    (select (SELECT short_description
    OF CODE_VALUES
    WHERE CODE_TYPE_CODE = ad. STATE_TYPE_IND_CODE
    AND VALUE = ad. STATE_CODE
    ) STATE,
    Nr.rate
    N-NEUTRAL
    c contacts,
    announcement of addresses,
    xref_contacts_addresses xca,
    neutral_rates nr
    where n.contact_id = c.contact_id
    and n.address_id = ad.address_id
    and xca.address_id = ad.address_id
    and xca.contact_id = c.contact_id
    and nr.contact_id = n.contact_id
    and nr.rate_frequency = 'HOUR')

    Like this

    with t
    as
    (
    select 'AL' state, 12 value from dual union all
    select 'AL' state, 67 value from dual union all
    select 'AL' state, 23 value from dual union all
    select 'AL' state, 12 value from dual union all
    select 'AL' state, 12 value from dual union all
    select 'AL' state, 78 value from dual union all
    select 'AL' state, 34 value from dual union all
    select 'AL' state, 4 value from dual union all
    select 'AL' state, 12 value from dual union all
    select 'AL' state, 15 value from dual union all
    select 'AZ' state, 6 value from dual union all
    select 'AZ' state, 123 value from dual union all
    select 'AZ' state, 123 value from dual union all
    select 'MA' state, 23 value from dual union all
    select 'MA' state, 120 value from dual union all
    select 'MA' state, 456 value from dual union all
    select 'MA' state, 11 value from dual union all
    select 'MA' state, 24 value from dual union all
    select 'MA' state, 34 value from dual union all
    select 'MA' state, 87 value from dual union all
    select 'MA' state, 23 value from dual union all
    select 'MA' state, 234 value from dual union all
    select 'MA' state, 789 value from dual union all
    select 'MH' state, 54321 value from dual
    )
    -- End of test data
    select state,
           nvl(count(decode(value, 0, 0)), 0) "<100",
           nvl(count(decode(value, 1, 1)), 0) "100-199",
           nvl(count(decode(value, 2, 2)), 0) "200-299",
           nvl(count(decode(value, 3, 3)), 0) "300-399",
           nvl(count(decode(value, 4, 4)), 0) "400-499",
           nvl(count(decode(value, 5, 5)), 0) "500-599",
           nvl(count(decode(value, 6, 6)), 0) "600-699",
           nvl(count(decode(value, 7, 7)), 0) "700-799",
           nvl(count(decode(value, 8, 8)), 0) "800-899",
           nvl(count(decode(value, 9, 9)), 0) "900-999",
           nvl(count(decode(value, 10, 10)), 0) ">=1000"
      from (
              select state, case when value < 100 then 0
                                 when value between 100 and 199 then 1
                                 when value between 200 and 299 then 2
                                 when value between 300 and 399 then 3
                                 when value between 400 and 499 then 4
                                 when value between 500 and 599 then 5
                                 when value between 600 and 699 then 6
                                 when value between 700 and 799 then 7
                                 when value between 800 and 899 then 8
                                 when value between 900 and 999 then 9
                                 when value >= 1000 then 10
                            end value
                from t
           )
     group
        by state
    
  • How to use the style grep for "BOLD" of specific characters in a name?

    Hello world

    I use InDesign CS6. The name of our company is Careington. We need to "BOLD" care in careington. I was doing this manually before I learned about grep styles. So I created a character "BOLD" style, then I created a style of grep with the following:

    Apply the Style: "BOLD"

    Text: Car [eington] / not mistyped.

    I tried care [ington], but he did only this eington of the car, so I had to type car [eington] to get this careington. I still don't understand why this is happening.

    Now it works as [eington], but for some reason, every time care is in itself or used anywhere (health care, care, etc.), it is "BOLD" as well. Not when he's in chargeington.

    Any ideas on how I can work this formula is more specific and unique "BOLD" care when he's with "ington.

    Thanks, Mike

    Appy Style "BOLD"

    text: Care(?=ington)

    It worked when I tested it

  • How to use the class IIA for LabVIEW driver wrappers?

    Hi all

    I've read some texts on IVI compliance, but I have not quite how I wrap an IVI - COM to an IVI - C. Where is this done?

    In MAX, I see:

    -Configuration-> software-> IVI Compliance Package 3.3

    But no properties in there...

    I have an analizer spectrum available drivers are only IVI - COM, but I want to wrap them up in IVI - C...

    can someone tell me step by step how can I do this?

    or maybe tell me some beginner tutorial?

    Kind regards

    JPLO

    Hello JPLO,

    Before trying to communicate with your instrument using any sort of instrument drivers, you must confirm that you can connect at a lower level.  In most cases, this means through VISA, using MAX.  IVI - COM driver installation program should add a software module to the IVI Configuration, which is the MAX.  Most installers IVI - C also adds a pilot session, but you'll need to create a.

    We include adaptors IVI - COM for class IVI - C with PKI pilots.  Here's a knockout who talk about them: IVI-C class for specific drivers IVI-COM driver Support

    You can also simply treat the IVI - COM driver like any other ActiveX object.

    What type of instrument you are using?

    See you soon,.

    NathanT

  • How to use the control quantity for several sliders in the basic settings window

    In a Webinar instructor (Chris Orwig) showed how to make multiple adjustments in the base Panel in the develop module.  Then, he showed how close the Basic module by clicking the small triangle at the top of the module.  The Basic module closed when it made a single control bar and the cursor appears instead. This move allowed the instructor set all previously defined parameters of basic module at the same time.  I tried to do.  But when I close the base module that no control bar and the slider appear.  Any suggestions why this is the case?

    I use Lightroom 5.4 and OS 10.9.2.

    Obviously, he wasn't in the base Panel, but in the adjustment brush:

    By clicking the triangle at the end of the red arrow, you get this:

    And there is your cursor effect.

    HAL

  • How to use the same script for several buttons

    Hello

    I have just started using flash if any help would be great!

    I create a blockbuster game, I have a grid of 20 buttons and I need (individually) to turn blue on red and click double click. I managed to do it with the first using this code;

    --------------------------------------------

    var click: Boolean = false;

    BN1.addEventListener (MouseEvent.CLICK, bn1click);

    function bn1click(event:MouseEvent):void {}

    clicked = true;

    var newColorTransform:ColorTransform = bn1.transform.colorTransform;

    {if (clicked)}

    newColorTransform.color = 0 x 064258;

    }

    BN1. Transform.ColorTransform = newColorTransform;

    }

    /////////////

    BN1.doubleClickEnabled = true;

    var doubleclicked:Boolean = false;

    BN1.addEventListener (MouseEvent.DOUBLE_CLICK, bn1dclick);

    function bn1dclick(event:MouseEvent):void {}

    DoubleClicked = true;

    var newColorTransform:ColorTransform = bn1.transform.colorTransform;

    {if (clicked)}

    newColorTransform.color = 0xac1e23;

    }

    BN1. Transform.ColorTransform = newColorTransform;

    }

    --------------------------------------------

    Now, I'll have trouble doing the same thing to work for the rest of the buttons, they are each named bn2, bn3 etc. They need to work individually and stay blue/red when clicked. I tried to list them as addEventListener orders but not with not a lot of success!

    Any help would be greatly appreciated, thank you!

    Tomo

    To do this is to use arrays to follow the buttons and their properties.

    var buttonList:Array = new Array (bn1, bn2, bn3);

    var clickedList:Array = new Array();

    var doubleClickedList:Array = new Array();

    Then use a loop for to assign functions and properties for each button:

    var thisMany:int = buttonList.length; This will give you the number of items in the buttonList array

    for (var i: int = 0; i

    buttonList [i] .addEventListener (MouseEvent.CLICK, btnClick); assign the function click on each button

    buttonList [i] .addEventListener (MouseEvent.DOUBLE_CLICK, btnDClick); assign the double-click function

    clickedList.push (false);  Add a value of false for each key in this table

    doubleClickedList.push (false);

    buttonList [i] .doubleClickEnabled = true; Set the property of double-tap for each button

    }

    function btnClick(event:MouseEvent):void {}

    var thisButton:int = buttonList.indexOf (event.target);  know which button has been clicked as an element in the table

    clickedList [Ceboutonselectionnel] = true;  Change the value in the table

    var newColorTransform:ColorTransform is buttonList [Ceboutonselectionnel].transform.colorTransform;.

    {if (clickedList [thisButton])}

    newColorTransform.color = 0 x 064258;

    }

    buttonList [Ceboutonselectionnel].transform.colorTransform = newColorTransform;

    }

    function btnDClick(event:MouseEvent):void {}

    var thisButton:int = buttonList.indexOf (event.target);

    doubleClickedList [Ceboutonselectionnel] = true;

    var newColorTransform:ColorTransform is buttonList [Ceboutonselectionnel].transform.colorTransform;.

    {if (doubleClickedList [thisButton])}

    newColorTransform.color = 0xac1e23;

    }

    buttonList [Ceboutonselectionnel].transform.colorTransform = newColorTransform;

    }

    Now you can have any number of buttons, just add their instance names in the table above.

  • How to use the Photomatix Pro for HDR plugin?

    I have the plugin Photomatix Pro 3.2.9 for Lightroom 3.3 and you can't make it sucessfully validate an image.  When I select camera 3 bracketed images into Lightroom and export to Photomatix Pro to do HDR the image seems to export them all right as I see the LR progress graphic top left showing the process of the images until the end, but then nothing happens.  I'd guess no image has been registered but simply exported to Photomatix, but then nothing shows and do not open or handle anything. Can I still use Photomatix successfully on its own without the use of LR but as I use LR as my image browser it would be beneficial to use it.  Any help please?  I'm on Mac OSX.

    You check the plugin version of LR plugin Manager.

  • [DITA] How to use the attribute valign for table row to control the position of a list

    This attribute seems quite apply to < TEXT >. If a ul, p, or fig element appears in the table cell, it will not work.

    I also tried to write a rule context to li, as ul < entry < row [valign = "middle"], but there is no chance.

    OK, I had finally it works.

    I should have written the rule of context as a paragraph, so that it will not be substituted by another rule.

Maybe you are looking for

  • Motorola Xoom 3 G usable in Europe?

    Hi all Two days ago, I bought a Motorola Xoom. This makes me a 'true early adopter", because I'm from Netherlands, and from what I understand the Xoom will be introduced in Europe in the early April or may. In addition, up to now, I was very happy wi

  • CheckSUR.exe

    My system can not install updates.  I downloaded checksur.exe, but whenever I try to launch it I get the error message Setup of the Windows Update Agent has encountered an unrecoverable error.  What should I do now?  I turned the firewall and antivir

  • Connection to the banking Web sites

    For some reason some a few days ago I stopped being able to connect to the Bank Web sites. It doesn't matter which browser I use I either get the message Web page is not available or the page has been reset. So far, no one knows how to solve this pro

  • Planning question

    Hello worldI have some questions related to establishing objectives for managers. Here's the question and please someone explain if it is possible with planning.1. move accounts between managers2. what happens if the analysis to show the impact of a

  • Kernel panic when suspending VM Win7 in Fusion 5

    Well, I just had to update my corporate network password, so I was disconnected my Windows 7 VM and then signed back with the new AD password. Everything is connected normally. I went to suspend the virtual machine and about two seconds after, I get