Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Go Back   Code Forums > Application and Web Development > PHP
User Name
Password

Reply
 
LinkBack Thread Tools Display Modes
Old 06-20-2007, 01:43 PM   #1 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,114
Belisarius is on a distinguished road
Prepared Statements, SQL functions and MDB2

I'm using MDB2 for database connectivity on a project. I had been using DB, but that's depricated, and I figured there's no point in building something new based on a depricated framework.

Now, one of the things I do is create geo-spatial datapoints and insert them as values for query later. This is a unique datatype that is formed by calling an SQL function - the general format is "PointFromText(<lat> <lon>)".

Now, I want to create a prepared statment out of this, as I have a lot of points to enter. The problem is, I can't seem to use them in MDB2. The result is, according to the debugging output, "PointFromText(? ?)". That's literally it - it doesn't translate the "?" to a value as it does with the rest of the SQL statement. In DB, I used the "!" symbol, and it worked fine, but I can't get it to work under MDB2. I've even created a "types" array, and told it exactly what type it was (float). No joy.

Can anyone give me any ideas short of going back to DB?
__________________
GitS
Belisarius is offline   Reply With Quote
Old 06-20-2007, 02:00 PM   #2 (permalink)
DJMaze
Senior Contributor
 
DJMaze's Avatar
 
Join Date: Mar 2005
Posts: 635
DJMaze is on a distinguished road
Just run a query without prepare?
__________________

UT: Ultra-kill... God like!
DJMaze is offline   Reply With Quote
Old 06-20-2007, 02:29 PM   #3 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,114
Belisarius is on a distinguished road
I've actually done that as well, but it really irks me I was able to do it with the *deprecated* version, but not the current. Plus, the database overhead is the single largest timesink, and I'd really like to do anything I can to reduce it.
__________________
GitS

Last edited by Belisarius : 06-21-2007 at 03:08 AM.
Belisarius is offline   Reply With Quote
Reply


Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 05:00 PM.


Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2006, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting
Open Circle