Jump to content

Dreamweaver query window and SELECT LEFT(


Recommended Posts

Please help!

I have a query that works fine in the Dreamweaver query test SQL window but not when you run it. I am using MyqSQL ( latest ) and PHP with DWMX 2004.

 

I have a field 'day' that holds a text values like "29/08/2004" ( yes I am using a text field when it is in fact a date field - I'll ask this in a mo if that's ok).

I want to be able to print a little calender using Repeated Regions.

 

I've written a query that does something like this:

 

SELECT LEFT(day,2)

When I test this in the Dreamweaver query window, the query runs correctly and I get e.g.

 

01

02

03

 

- so the query with the LEFT bit tests fine in the Dreamweaver query window. When I run the query on the webpage through PHP I get no table produced or data but just some text on the web page n e.g.

 

LEFT(2).

 

It seems when ever I try to use LEFT or SUBSTR to chop a field for display, it doesn't work. I am really stuck. If the query worked in the test window, why shouldn't it in the main web page window? I've tried using normal tables, repeated regions, all kindsa stuff. Please help Obi One you are our last hope!

 

 

 

Link to comment
Share on other sites

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

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

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

×   Your previous content has been restored.   Clear editor

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

×
×
  • Create New...

Important Information

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