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
https://forums.phpfreaks.com/topic/2220-dreamweaver-query-window-and-select-left/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.