Can you use a php variable to filter a recordset?

I've got a table of 'events', which have a description and
more importantly for this a month ID number. (1-12 for the months
of the year, when the event takes place) .
I've used php's date function on a page to fund out
numerically what month it is now $thismonth = date("n");
i want to filter my recordset by only bringing up events that
take place during the current month so where event_month =
$thismonth
IS this possible? It seems like it should be easy to do but I
can't get it to work.
Thanks in advance
Dave

jnkjnkjnkjnkjn wrote:
> i want to filter my recordset by only bringing up events
that take place
> during the current month so where event_month =
$thismonth
>
> IS this possible? It seems like it should be easy to do
but I can't get it to
> work.
Yes, it's very easy, but you need to do a little hand-coding.
In the
Advanced recordset dialog box set the end of the SQL query to
WHERE
event_month = 1. When you have saved the recordset, change
the SQL to
WHERE event_month = $thismonth.
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

Similar Messages

  • Maxl - can you use variables in iferror statements

    hi guys,
    A quick one:
    Can you use variables when doing error handling? I assume the answer is yes, but just wanted to make sure.
    example:
    set app1 = Test;
    set app1_db1 = Test;
    alter database $app1.$app1_db1 force archive to file "C:\\EssbaseBackup\\$app1\\$app1_db1\\$app1_db1.arc";
    iferror 'Bk_$app1.$app1_db1_Error';
    define label 'Bk_$app1.$app1_db1_Error';
    exit 10;
    I am putting error handling into my script and want to double check before I go about making the alterations.
    Many thanks,
    Russell
    Edited by: RussellH-C on 26-Apr-2013 04:45

    You don't need to split the files. Create a Maxl with parameters and then call it in a bat file.
    In the bat you can then check for Error.
    essmsh -D "%HYP_MONTH_SCRIPTS_DIR%\Maxl_Files\HYP_ESS_Archive.msh" %DECRYPTKEY% Appname1 Dbname1
    call :archiveerrcheck
    essmsh -D "%HYP_MONTH_SCRIPTS_DIR%\Maxl_Files\HYP_ESS_Archive.msh" %DECRYPTKEY% Appname2 Dbname2
    call :archiveerrcheck
    archiveerrcheck:
         SET FILE=%MAXLLOG_DIR%\Archive.log
         findstr /R "\<ERROR" %FILE% > ESSErrCheck
          for /F %%A in ("ESSErrCheck") do If %%~zA NEQ 0 (
            call :datestamp
            echo  Error in Archive Process......................... > %ESSLOG%
            copy %FILE% %HYP_MONTH_ERR_DIR%\Essbase\MaxL\Maxl_Error.log
            DEL /Q ESSErrCheck
            call :exit_process
           ) else (
                   echo  %DTSTMP%  Log Out Process was successfull......................... >> %ESSLOG%
                   call :remove_file ESSErrCheck
    GOTO EOF
    :EOFRegards
    Celvin
    http://www.orahyplabs.com

  • Can i use a environment variable inside a *.sql file?

    Hello,
    I want to create a external table.
    So i am using the command
    create or replace directory abc as 'C:\folder'.... inside a sql file.
    Now i want the path "C:\folder" to be dynamic as i am using this path in many other places also inside the sql file.So i thought to create a environment variable and put this value there.I tried using as %PATH% but it gives error..... where %PATH%=C:\folder.
    Can i use a environment variable inside a *.sql file?
    But how to do that or is there any other way.
    Thanks
    Swapna
    Edited by: user11018268 on Feb 19, 2010 1:03 AM

    user11018268 wrote:
    Actually what i want is the path "C:\folder" is not fixed it can be anything which i may not know the user may decide it later. Not supported. A directory object refers to a specific physical location (directory/folder) on a file system. Not a path.
    You can work around it by (creating and) using a function (running under a super user schema with authid definer privs). The caller (e.g. schema scott ) calls it with a physical path. E.g. GetDirectoryObject( 'C:\folder\2010\feb\week4' ).
    This function determines if there is an existing directory object for the path. If not, it uses a wildcard search to determine if there are any directory objects for parents in the path (e.g. for C:\folder\2010\feb or C:\folder\2010 or C:\folder ).
    If it finds a directory object, it interrogates the data dictionary to determine if the caller, schema scott for example, has read/write access on that directory object. If it has, it creates a new directory object and grants the caller read/write access to it. The function then returns the name of the directory object to the caller.
    The caller thus do not deal directly with directory objects. The function returns the object name given a physical path as input. Also, only a single base directory needs to be created (e.g. for C:\folder ) and access granted to the schema on it. Any sub-directory in that base directory can now be dynamically accessed by the schema.

  • How can I use the "Correct camera distortion" filter and process multiple files in PSE 11?

    How can I use the "Correct camera distortion" filter and process multiple files in PSE 11?

    Did you check the help page for Correct Camera Distortion and Process multiple file
    Correct Camera Distortion: http://helpx.adobe.com/photoshop-elements/using/retouching-correcting.html#main-pars_headi ng_5
    Process multiple files: http://help.adobe.com/en_US/photoshopelements/using/WS287f927bd30d4b1f89cffc612e28adab65-7 fff.html#WS287f927bd30d4b1f89cffc612e28adab65-7ff6

  • Can you have a local variable to handle wfm information?

    I am very new to test stand. Can you have a local variable to handle wfm information?
    Also how do you use parameters? Do you need to have a parameter of the same name in the main sequence and subsequence?
    Thanks,
    Brian
    Electrical Engineer
    L3 Communication

    Hi Brian
    Parameters are one way you can pass data from a calling sequence to a subsequence. From the main sequence, right-click on your subsequence and select "Specify Module...". In the "Parameters" section of the dialog box, you should see any parameters that you have for your subsequence. You can then assign these subsequence parameters to have the same value as a parameter from the calling sequence, a local variable from the calling sequence, a constant, etc. In regards to your question about naming parameters, you do not need to have parameters of the same name in both the calling sequence and the subsequence, although you could have them be the same name.
    Russell G.
    NI Applications Engineering

  • Can you use color splash on a photo that was edited in black and white or do you have to mask the photo before editing it in black and white?

    can you use color splash on a photo that was edited in black and white or do you have to mask the photo before editing it in black and white?

    I think you are asking whether it makes an difference whether you create the mask before or after you edit the black & white version. The answer is that since the color version and the b&w version are on different layers (as seen here), it makes no difference when you edit the b&w version.
    Also consider another technique that separates the color element in the image. Here, the area surrounding the color image is a line interpretation of the scene, similar to a Tone Line Conversion, a technique that was created with film many years ago.  (I am so old,  I still remember how it was done.) This is how to get the result similar to the one shown above but with a line illustration created in Photoshop replacing the b&w layer version:
    1. Open an image. This technique is more successful if the image you select has many clearly defined edges.
    2. Make a duplicate layer. (Cmd+J). It becomes Layer 1
    3. With Layer 1 chosen, go to Filter>Blur>Smart Blur. Set the Quality to High and the Mode to Edge Only. The default settings are Radius 3.0, Threshold 25.0. To increase the amount of detail in the line conversion, raise the Radius setting. Use the white-on-black illustration within Smart Blur as a guide. Then click OK.
    4. The line illustration will appear as white lines in a black background. To change this to black-on-white, choose Image>Adjustments>Invert.
    5. Insert a new layer below Layer 1. It will serve as the background for the line illustration. To do this, hold down the Command key while clicking on the New Layer symbol at the bottom of the Layers panel. It is the second symbol from the right. It will become Layer 2.
    6. Fill this new layer with a light color. To do this, click on the Foreground Color symbol in the Tools section. It will open the Color Picker. Choose a light color and click OK.
    7. Choose Edit>Fill. Use: Foreground Color.  Mode: Normal. Opacity: 100% and click OK. Layer 2 will fill with the color. Although it will not appear in the image because Layer 1 is above it, a quick check of the Layers panel will confirm that the color you chose has filled Layer 2.
    8. Remove the white area from in Layer 1. Go to Layer 1. Choose the Magic Wand tool. Uncheck the Contiguous box in the Options Bar and click in a white area of the image. Next, click the Delete key.  Choose Select>Deselect to remove the marching ants. 
    9. (Optional)  You may now change the line illustration in Layer 1 from black to a dark color compatible with the color in Layer 2. To choose the color, click on the Foreground Color symbol in the Tools section. It will open the Color Picker. Choose a suitable dark color and click OK. While in Layer 1, click the first symbol next to the word  Lock:  in the Layers panel above Layer 1. This will prevent the dark color from appearing in the blank area of Layer 1. Choose Edit>Fill. Use: Foreground Color.  Mode: Normal. Opacity: 100% and click OK. The black lines will change to the dark color you chose.
    10. Combine Layers1 and 2: While in Layer 1, choose Layer>Merge Down. The layers are combined into a single layer called Layer 2.
    11.  Add a black mask to Layer 2 by clicking on the Mask symbol at the bottom of the Layers panel. It is the symbol to the right of the fx symbol. Where you would like full color objects to appear within the line rendition, paint in white on the black mask with a brush set to either soft-edge or hard-edge as the illustration and your taste dictate.  

  • What other sites can you use with Libsyn/Blubrry?

    I noticed that Libsyn has an option to publish to blogger.
    If you wanted to have a wordpress site, do you need to get another web host or can you use the storage of your podcast files, via FTP, to a few pictures, etc. for your podcasts' site?
    One consistent complaint with Libsyn is how terrible their websites are, I don't mind blogger, but I'd like to know what my other options are...
    Blubrry seems to have wordpress support as a normal feature.
    could you use a google+ page as your podcasts' main site? Tumblr?
    Thanks again!

    Pse 10 can use most of the plugins that work in the full photoshop.
    Here are a couple of good links that should give you an idea of what plugins are out there:
    http://thepluginsite.com/resources/index.htm
    http://photoshop.pluginsworld.com/plugin.php?directory=adobe&software=photoshop

  • Can you use the same Apple ID on more than one MacBook Pro for updates and applications?

    We just got a few new MacBook Pro's and when I went to install updates it said I need to make an Apple ID.  Can you use the same Apple ID and email address for that Apple ID on multiple machines, or do I need them both to be unique per machine?  I'm not sure how that works when you have multiple machines.

    An Apple ID is a user name you use for everything you do with Apple. Creating an account for an Apple service, such as the iTunes Store or the App Store, creates an Apple ID. Apple ID allows you to access other Apple services.   So you can use the same Apple ID for up to 10 Macs associated with it.
    To create an Apple ID you need to enter  your full name and your primary email address as your Apple ID. This will be used as the contact email address for your account.

  • How many Ipods can you use with one Itunes account?

    How many iPods can you use/sync with one iTunes account?

    PT wrote:
    Macistotle wrote:
    Unless you have DRM still haunting your tunes ... Then you can only use those songs on 5 devices. Otherwise, connect as many as you like (as stated above).
    No, you can sync your DRM tracks to an unlimited number of iPods (but only authorized to play on 5 different computers/user accounts)
    Patrick
    So I can sync two iPods to my iTunes account and sync the same digital copy movies that come with some o' my DVDs to both ipods? Do movies make a difference really, DRM-Wise? Thanks in advance.

  • Can you use a iTunes card to purchase more storage for iCloud

    can you use a itunes card to purchase more storage for icloud

    No. iTunes Store only.
    "An iTunes Gift Card lets you shop for anything at the iTunes Store "  >  http://store.apple.com/us/browse/home/giftcards/itunes/gallery

  • Can you use soundtrack pro's loops in your youtube videos or do you need to purchase a license since it is royalty free?

    Can you use soundtrack pro's loops in your youtube videos or do you need to purchase a license since it is royalty free?
    I understand they are royalty free, I am just confused about using the actual loops for films, videos, etc - if there is a special license you must purchase or what?
    Yes sure, it's a library and may be used a lot - but is it legal or against agreement?
    And to clarify - what about music I create on the program , that is ok right?

    If you purchased the software you have the right to use the loops that came with the software in the software to make whatever you want.

  • Can you use the Airport Express A1264 as an AP and a DHCP server at the same time?

    Can you use the Airport Express A1264 as an Access Point and a DHCP server at the same time?
    I would like to use it as a DHCP server and AP at the same time in my LAN (no internet, just local machines through a few switches). I was lead to belive this could be the case from a few networking friends that haven't been friendly enough to help me out setting it up.

    I need it to act as a dLink/Cisco/Linksys/etc basic wifi router, in the fact that you can access it via wifi, and it will spit out DHCP addresses (192.168.1.xxx) to everything wired downstream of it.
    I want to simultaniously provide a Wifi connection and a LAN connection at the same time
    Thanks,
    BRad

  • HT204053 Can you use the same Apple ID for two devices ?

    I have an MacPro and I am buying an iPad.  Can you use the same Apple ID for two devices or should I create an new AppleID for the ipad?

    Welcome to Apple Support Communities
    The Apple ID purpose is to have the same data in all your devices and share your purchases among all your devices, so you can use your Apple ID in both devices

  • Can you use FaceTime using two iPads with same apple id

    Have two iPads for wife and I. Both use same apple ID account. Can you use FaceTime between them?

    Heres what you do. got to settings>facetime>add an email and than add another email (note: cannot be the same email that you use on your apple ID) A verifaction email will be sent. Go to your email account and verify the email by clicking on the link. Now using the other ipad, make a facetime call to the email you just verified and you can now facetime between the two!
    One more side note. Make sure that only the email you just verified has a check mark on it. The other ipad shoud have a check mark next to the orginal apple ID email.

  • Can you use 2 Thunderbolt Displays with Windows 7/Bootcamp on a Early 2011 Macbook pro?

    Can you use 2 Thunderbolt Displays with Windows 7/Bootcamp on a Early 2011 Macbook pro?
    I have 2 and cannot seem to get them to work?

    Can you use 2 Thunderbolt Displays with Windows 7/Bootcamp on a Early 2011 Macbook pro?
    I have 2 and cannot seem to get them to work?

Maybe you are looking for