473,327 Members | 1,979 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Using the $ character in query

Does anyone know a successful way to use the dollar sign character
within a query and not generate an error?

Here's what I'm trying to do... I have a query that successfully
counts the number of records within a query as well as totalizes the
dollar amount. What I'd like to do is show a dollar sign ahead of the
'amount' total when it queries back to the screen in my html document.

Is there something I can use to null the normal relationship PHP has
with the $ character where again, I can use it for text purposes?

TIA
Dec 4 '05 #1
5 3511
Why not simply assign a variable to the result and then add the dollar
sign?

Something like (pseudo PHP)

$shownamount = "$".$myquery.totalname

In article <ht********************************@4ax.com>,
co****************@yahoo.com says...
Does anyone know a successful way to use the dollar sign character
within a query and not generate an error?

Here's what I'm trying to do... I have a query that successfully
counts the number of records within a query as well as totalizes the
dollar amount. What I'd like to do is show a dollar sign ahead of the
'amount' total when it queries back to the screen in my html document.

Is there something I can use to null the normal relationship PHP has
with the $ character where again, I can use it for text purposes?

TIA

Dec 4 '05 #2
"cover" <co****************@yahoo.com> kirjoitti
viestissä:ht********************************@4ax.c om...
Does anyone know a successful way to use the dollar sign character
within a query and not generate an error?

Here's what I'm trying to do... I have a query that successfully
counts the number of records within a query as well as totalizes the
dollar amount. What I'd like to do is show a dollar sign ahead of the
'amount' total when it queries back to the screen in my html document.

Is there something I can use to null the normal relationship PHP has
with the $ character where again, I can use it for text purposes?

<?php

$query = "here's a cool dollar sign: ".'$'." , and some more text";
$anotherquery = "Another way to put a dollar sign \$ is to escape it with a
backslash";
echo $query;
echo $anotherquery;

?>

--
SETI @ Home - Donate your cpu's idle time to science.
Further reading at <http://setiweb.ssl.berkeley.edu/>
Kimmo Laine <an*******************@gmail.com.NOSPAM.invalid>
Dec 4 '05 #3
In article <dm**********@phys-news4.kolumbus.fi>,
"Kimmo Laine" <an*******************@gmail.com.NOSPAM.invalid> wrote:
"cover" <co****************@yahoo.com> kirjoitti
viestissä:ht********************************@4ax.c om...
Does anyone know a successful way to use the dollar sign character
within a query and not generate an error?

Here's what I'm trying to do... I have a query that successfully
counts the number of records within a query as well as totalizes the
dollar amount. What I'd like to do is show a dollar sign ahead of the
'amount' total when it queries back to the screen in my html document.

Is there something I can use to null the normal relationship PHP has
with the $ character where again, I can use it for text purposes?

<?php

$query = "here's a cool dollar sign: ".'$'." , and some more text";
$anotherquery = "Another way to put a dollar sign \$ is to escape it with a
backslash";
echo $query;
echo $anotherquery;

?>


print '$A $third $way $is $to $not $use $interpolating $quotes';

--
Sandman[.net]

Edwin, on protecting against malware:
"I use Avast AV, the Yahoo anti-spy toolbar, the MS anti-spy software,
Windows SP2 with its firewall, AdAware, Spybot Search and Destroy, and
SpywareBlaster."
Dec 4 '05 #4
Thanks very much for the replies and great ideas, all... Thanks to
your help, the problems's resolved and it looks slick... :-)
Dec 5 '05 #5
JDS
On Sun, 04 Dec 2005 00:00:42 -0800, cover wrote:
Does anyone know a successful way to use the dollar sign character
within a query and not generate an error?


Use single quotes

But what is the actual code that is generating an error and what is the
error?

--
JDS | je*****@example.invalid
| http://www.newtnotes.com
DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/

Dec 5 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Jimmy Tran | last post by:
Hello, I am doing a bmw tracking project for school using asp and access2000. on my search.asp page, I can search for a particular bmw and order it if i want. It works fine when i do select query...
19
by: Ian | last post by:
I'm using the following meta tag with my documents: <meta http-equiv="Content-Type" content= "text/html; charset=us-ascii" /> and yet using character entities like &rsquo; and &mdash; It...
3
by: GL | last post by:
Hi, Is there a way to add a field to an existing table using a query of some sort (without needing to manually add a field to the table). I know how to do it with a make table query, but I have...
2
by: Don Wash | last post by:
Hi All! I've been searching everywhere for a simple sample of producing a bar graph using CrystalReport by specifying SQL Query, and I've found none of it! I find so many complex samples with so...
6
by: Eduardo78 | last post by:
Ok, I have a Field that has a combination of letter C and a Number that increments by one. example: C1 C2 C3 C4 C5 C6
3
by: Jim Lewis | last post by:
I have read several things that state accessing a Web Service through a Query String should work. However, when I try to execute http://localhost/webservice1/service1.asmx/HelloWorld I get the...
0
by: astersathya | last post by:
Date Format in MS Access using a query Hi I want to alter the existing column's format using the alter query. The issue I am facing is I want to set the default date format of an existing...
0
by: Peter Herath | last post by:
I want to create a custormizable report . For an example, there's a form with four combo boxes and two of them having database tables columns/field names as values in the combo box(one for select row...
3
accessbunnie
by: accessbunnie | last post by:
Hello Access Users! I am a bit of an Access novice and am currently creating a database and have come up against a huge (for me!) road block. I do not write in Access code and instead, tend to...
13
by: Ivan | last post by:
Hi, What is the best syntax to use a char to index into an array. /////////////////////////////////// For example int data; data = 1;
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.