Database Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesDatabase Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old July 7th, 2003, 07:17 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
PHP & PostgreSQL

I'm having a bit of trouble getting predicates to work in a SELECT statement,
< WHERE fromlocation LIKE 'Leeds' > works but
< WHERE fromlocation LIKE '$xstart' > and
< WHERE fromlocation LIKE '".$xstart."' > do not. The contents of $xstart print out fine using: < print $_REQUEST['xstart'] ; >

I want to use the xstart variable as a predicate and according to the documentation I have seen, LIKE '$xstart' should work.

$query = "SELECT fromlocation,tolocation,driver,emptyseats,journeyd ate,text,return,dateentered FROM tjourney WHERE fromlocation LIKE '$xstart' order by 1,2,4";

Help,

Andy
---------
Red Hat Linux 9.0
PHP
PostgreSQL

Reply With Quote
  #2  
Old July 7th, 2003, 11:20 PM
sliver's Avatar
sliver sliver is offline
Moderator
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: WI, USA
Posts: 888 sliver User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 21 h 16 m 42 sec
Reputation Power: 2
Send a message via AIM to sliver Send a message via XFire to sliver
RE: PHP & PostgreSQL

Try adding:
php Code:
Original - php Code
  1.  
  2. $xstart=$_REQUEST['xstart'];

Before you define your query ($query=sel...)

Reply With Quote
  #3  
Old July 8th, 2003, 08:25 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: PHP & PostgreSQL

Cracked it! Many thanks

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesDatabase Help > PHP & PostgreSQL


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway