Re: parse error in nested query - please help.

From: 'bonehead (senmenospam_at_here.org)
Date: 07/06/04


Date: Mon, 05 Jul 2004 17:37:44 -0700

Pedro Graca wrote:
> I usually do (pseudo-code)
>
> <?php
> $query = "whatever";
> $result = mysql_query($query)
> or die('Error in query [' . $query . ']. The error was: ' . mysql_error());
> ?>
>
> Hint: is $_SESSION['username'] a string?

Okay I'll hazard a guess on this one. I haven't tested this particular
solution, but I've occasionally run into similar problems.

If Polar's $query is holding a string, is it possible that the php
expressions must be concatenated as they are in Pedro's example? For
instance, wouldn't you really need to do something like this:

$query = "UPDATE Submission SET reader='".{$_SESSION['username']}."',
date_processed=NOW(), accepted='Y' WHERE sub_id='".$row[0]."'";

Also, wouldn't you want to do something like

/*temporary error check line*/
echo $query;

Just to make sure the query looks the way it's supposed to?

Hope this helps.



Relevant Pages

  • Re: Include Function in Sort
    ... Okay, ... Now if I use TotalTime as the record source for my text field, I Get Exactly The Result I Want! ... until I sort? ... If it is a field in the query, you need to pass it to the ...
    (microsoft.public.access.formscoding)
  • Re: Authentication Problem Is Making Me A Little Nuts
    ... an obvious difference is that the first box was running Win2K3 and ... if I specify an actual DC name in the LDAP query ... then it works okay. ... > This was working just fine, but when I moved my app to a different server ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Add New Record
    ... You can enter a new record if you open the query directly. ... You are able to edit existing records okay in this form. ... Under some conditions, the converter can fail and you end up with a Label control bound to a field, which doesn't work at all of course. ... Allen Browne - Microsoft MVP. ...
    (microsoft.public.access.forms)
  • Data Dependencies Function
    ... I created a table, Table1, with 2 fields, Task and Done. ... Using this query: ... Okay, lets look to see how it works. ... then it is a parent. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Query to search entire record, not one field?
    ... I think we (okay YOU) have solved the problem. ... >> in criteria for all fields in my Query. ... >> If I enter a state in my Master Record and then leave State blank (or ...
    (microsoft.public.access.queries)