Re: [PHP-DB] return array

2004-06-25 Thread Sukanto Kho
Yeah I have try that... and when I : echo $field[1] appear error msg : "Undefined offset: 1 " - Original Message - From: "Sam Chill" <[EMAIL PROTECTED]> To: "PHP DB Help" <[EMAIL PROTECTED]> Sent: Saturday, June 26, 2004 11:21 AM Subject

Re: [PHP-DB] return array

2004-06-25 Thread Sam Chill
Instead of return $field[]; try return $field; -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] return array

2004-06-25 Thread Sukanto Kho
Hi All, how to return array var from function ?? I have try that but just can't return it.. here's my code :(function to return any fields name from table) function fields($table,$db_name) { $link=$this->database(); // this open the database connection $fields = mysql_list_fields($db_n

RE: [PHP-DB] Return Array from Function - SOLVED

2002-09-26 Thread Hutchins, Richard
save you some. ;) Thanks for the help. > -Original Message- > From: Dave Smith [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 26, 2002 4:31 PM > To: Hutchins, Richard > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP-DB] Return Array from Function > > > T

Re: [PHP-DB] Return Array from Function

2002-09-26 Thread Dave Smith
Try single-quotes instead of double (' instead of "). Could be an interpolation issue. --Dave On Thu, 26 Sep 2002, Hutchins, Richard wrote: > Can somebody tell me what I might be doing wrong in the code below? I'm > trying to use a function to perform an often-used db query and return the > re

Re: [PHP-DB] Return Array from Function

2002-09-26 Thread 1LT John W. Holmes
You can't start variables with a number. ---John Holmes... - Original Message - From: "Hutchins, Richard" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, September 26, 2002 4:18 PM Subject: [PHP-DB] Return Array from Function > Can somebody

RE: [PHP-DB] Return Array from Function

2002-09-26 Thread Hutchins, Richard
Sorry, line 51 is the one that reads: $1contentID=$row["1contentID"]; > -Original Message- > From: Hutchins, Richard [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 26, 2002 4:19 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Return Array

[PHP-DB] Return Array from Function

2002-09-26 Thread Hutchins, Richard
Can somebody tell me what I might be doing wrong in the code below? I'm trying to use a function to perform an often-used db query and return the resulting resource to the calling script. I keep getting this error though: Parse error: parse error, unexpected T_LNUMBER, expecting T_VARIABLE or '$'