[FX.php List] MySQL and FX.php help needed - MORE INFO

Marisa Smith listmember at datasmithconsulting.net
Wed Aug 15 13:38:25 MDT 2007


Hi Chris-

Thanks for taking a look at this.  Not sure if this is a hint or not,  
but if I echo back $theResult on line 875 of FX.php it comes up as  
"1" instead of Resource id #xxx like it does on the other types of  
actions.

I noticed in the PhP documentation that it says this about the  
mysql_query() function:

	For other type of SQL statements, UPDATE, DELETE, DROP, etc,  
mysql_query() returns TRUE on success or FALSE on error.

So I wonder if you need to generate a select statement to go find the  
updated row via the recID (data key) and feed that back to return data?

I know just enough to be dangerous so I don't want to attempt this  
myself....

- Marisa

On Aug 15, 2007, at 2:35 PM, Chris Hansen wrote:

> Marisa,
>
> My guess is that this may be an FX.php bug, but I won't have time  
> to look until this evening.  Best,
>
> --Chris Hansen
>   FileMaker 8 Certified Developer
>   FileMaker 7 Certified Developer
>   Creator of FX.php
>   "The best way from FileMaker to the Web."
>   www.iViking.org
>
>
> On Aug 15, 2007, at 11:48 AM, Marisa Smith wrote:
>
>> I also discovered this seems to happen not only with editing a  
>> record, but also after creating a new record or deleting a record/ 
>> row.  In each case, I get the 2 warnings referenced below, and  
>> there is nothing in the ['data'] array coming back from FX.   In  
>> all cases, the records get created, deleted, and edited in the  
>> MySQL database as expected, so I'm kind of stumped.
>>
>> Thanks.
>>
>>
>> On Aug 15, 2007, at 1:21 PM, Marisa Smith wrote:
>>
>>> I'm using FX.php with MySQL for the first time.   I'm having  
>>> trouble with editing a record and returning data from FX.   The  
>>> record in MySQL *IS* edited appropriately, but the ['data'] array  
>>> being returned is empty.  I'm also getting these 2 errors:
>>>
>>>
>>> Warning: mysql_affected_rows(): supplied argument is not a valid  
>>> MySQL-Link resource in /Library/WebServer/Documents/brainstem/FX/ 
>>> FX.php on line 881
>>>
>>> Warning: mysql_fetch_assoc(): supplied argument is not a valid  
>>> MySQL result resource in /Library/WebServer/Documents/brainstem/ 
>>> FX/FX.php on line 887
>>>
>>> I tried explicitly setting the $returnedDataArray to true when I  
>>> call FMEdit('true', 'full'); but it's still not returning  
>>> anything.   Any ideas would be greatly appreciated!
>>>
>>> FYI:  Here is the query being sent in by FX:
>>>
>>>
>>> UPDATE Cases SET PhoneCallerLastName = 'Smith', PhoneCallerNumber  
>>> = '(734) 555-1212', PhoneCallDate = '2007-08-10',  
>>> PhoneCallLogDate = '2007-08-12', PhoneCallerFirstName = 'Fred',  
>>> TrackingItemDetails = 'Test details again.', RecipientContactKey  
>>> = '13' WHERE key_ = '42';
>>>
>>> Sorry if I'm not explaining this well.
>>>
>>>
>>>
>>> Thanks.
>>> --------------------------------------------------------------------
>>> Marisa Smith, Partner
>>> DataSmith Consulting
>>> - a Division of The Whole Brain Group, LLC
>>>
>>> P.O. Box 8275
>>> Ann Arbor, MI 48107
>>> 734.929.0431 - phone
>>> 734.929.0058 - fax
>>> marisa at datasmithconsulting.net
>>> www.datasmithconsulting.net
>>> _______________________________________________
>>> FX.php_List mailing list
>>> FX.php_List at mail.iviking.org
>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20070815/5bd2dd98/attachment-0001.html


More information about the FX.php_List mailing list