Search found 13 matches

by bianster
Fri Aug 27, 2004 4:38 am
Forum: PHP - Code
Topic: Unable to get file from GET request
Replies: 2
Views: 610

Unable to get file from GET request

I have this code that will retrieve HTML files from a common folder, some checks are perfomed to ensure that only certain directories and files are allowed to be included in the main index.php file. What's happening now is that after I've added some new HTML files into the common folder and I "...
by bianster
Tue Aug 03, 2004 9:40 pm
Forum: Databases
Topic: Problems with using SQL Between
Replies: 1
Views: 289

Problems with using SQL Between

I have a SQL query as the one below => <?php $query = "select ID, source, finalPayment, salesPerson1 from Invoice where salesPerson1 > 1 and finalPayment != 0 and finalPaymentDate between $month and $nextMonth"; ?> What happens is that the query returns ALL the records that fulfill "s...
by bianster
Tue Aug 03, 2004 8:02 am
Forum: PHP - Code
Topic: array variable assignment problems
Replies: 3
Views: 406

well I'll be damned.....

assigning the count value to a variable first did the trick! Man, it's things like this that make stuff tougher than it is.

Thanks a lot, man
by bianster
Tue Aug 03, 2004 7:49 am
Forum: PHP - Code
Topic: array variable assignment problems
Replies: 3
Views: 406

array variable assignment problems

I have problems with the section of code below, data stored by $salesPerson is an array containing other arrays as its elements. Now the main problem is that the for loop performs an indefinite loop. I still can't see what's the problem after spending several hours on this. Assigning values like thi...
by bianster
Mon Mar 01, 2004 7:54 am
Forum: Databases
Topic: MS Access Syntax error for insert into statement
Replies: 0
Views: 330

MS Access Syntax error for insert into statement

Hi All, Would someone be so kind to assist with a problem Im having? I have some code that inserts rows into either an empty table or carries on from an existing row record. The problem I'm having right now is that I keep getting the SQL error: [Microsoft][ODBC Microsoft Access Driver] Syntax error ...
by bianster
Tue Feb 24, 2004 9:39 am
Forum: PHP - Code
Topic: check against original and modified data
Replies: 1
Views: 735

check against original and modified data

I have a table named Vehicles(vehno, vehmodel, owner). I will have a form that allows the updating of a user's profile, this profile includes the user's vehicles. Im having trouble figuring out how to check the updated form's vehicle information against the database. for example: User modifies the c...
by bianster
Mon Feb 16, 2004 5:58 am
Forum: PHP - Code
Topic: Access db connections from functions in included files
Replies: 3
Views: 545

I made a mistake in the 2nd post, setting DB_CONN to global in the function actually DOES NOT work...

When I try to fetch a row from the result set, I get this "Invalid ODBC resource identifier" message...
by bianster
Sun Feb 15, 2004 8:08 am
Forum: PHP - Code
Topic: Access db connections from functions in included files
Replies: 3
Views: 545

Ah...dumb me... Minutes after posting this...I found the solution in this very forum. Just declare the connection variable as global in the function... global DB_CONN; I just have another question...for functions like odbc_fetch_row(), is the database connection needed to perfom it successfully? If ...
by bianster
Sun Feb 15, 2004 7:51 am
Forum: PHP - Code
Topic: Access db connections from functions in included files
Replies: 3
Views: 545

Access db connections from functions in included files

Hi all, I have a file named connectDB.inc.php: <?php define("DB_SERVER", "localhost"); define("DB_USER", ""); define("DB_PASSWORD", ""); define("DSN", "records"); //Establish database connection $DB_CONN = odbc_connect(D...
by bianster
Tue Feb 10, 2004 7:31 am
Forum: Databases
Topic: Inserting data into a MS Access DB
Replies: 5
Views: 683

i think i know where the problem is occuring now...I'm trying to insert boolean data into a BIT column in the table. But is there a way to convert/cast the boolean into a BIT value??

the functions i found return strings...etc decbin()...
by bianster
Mon Feb 09, 2004 4:36 am
Forum: Databases
Topic: Inserting data into a MS Access DB
Replies: 5
Views: 683

in Access, they're yes/no fields formatted as true/false....
by bianster
Sun Feb 08, 2004 4:16 am
Forum: Databases
Topic: Inserting data into a MS Access DB
Replies: 5
Views: 683

no dice, I tried that method before and the same thing happened...
by bianster
Sun Feb 08, 2004 3:47 am
Forum: Databases
Topic: Inserting data into a MS Access DB
Replies: 5
Views: 683

Inserting data into a MS Access DB

Hi all, i'm having some problems running a SQL insert for an Access DB. I echoed the SQL string to the screen: INSERT INTO member values ('bianster@aserver.com','72bKD5BpMVi4k','Doug',12345678,12345678,false,false) and it checks out alrite but I keep getting: Warning: odbc_exec(): SQL error: [Micros...