sending a MySQL query



Hi

I might be trying to do something that can't be done

I have a PHP script that creates a zipped CSV file on the fly.
I am trying to send it the MySQL query via a link but I get errors as if it
has not received the query

the link is

<a href="makezip.php?q=SELECT * FROM js WHERE lcase(dnote) =
lcase('T1107837')" target="exportWindow">EXPORT<a>

the error is supplied argument is not a valid MySQL result

the code on the makezip.php is

$result = mysql_query($q,$db);
if ($myrow = mysql_fetch_array($result)) {..........

is there any reason why I can't send my query to it and get it to run?


Thanks

Brian




.



Relevant Pages

  • Re: sending a MySQL query
    ... I have a PHP script that creates a zipped CSV file on the fly. ... I am trying to send it the MySQL query via a link but I get errors as if it ... Sending a whole sql-query, even if it wouldn't had included any whitespaces, better you set up a list of sql-queries that you would usually allow to be exported as a zipped file and see what arguments you would be able to adjust. ...
    (alt.php)
  • Re: mysql_query(): supplied argument is not a valid MySQL-Link resource
    ... When I had my first attempt at using functions in a PHP script I had similar ... I got round it by passing all variables outside the function into ... > close a connection to the database very time I run a query. ...
    (comp.lang.php)
  • Re: mysql_query return value confusion
    ... Bill wrote: ... > I have the following line in a php script ... query was legal and could be executed by the server. ... When I passed the mysql resource in the mysql_affected_rows(<db resource ...
    (alt.php)
  • Re: Query problems with PostgreSQL
    ... postgresql database. ... I have a form where I can enter a search query - for instance a last ... 'public.archived_with_photos' is a view defined on the postgresql ... the exact same query failed with the PHP script. ...
    (comp.lang.php)
  • require_once(DB.php) failure
    ... I'm using a relatively simple php script to query a mySQL database and ... There is one php file that handles the connection to the ... db and one that handles the query. ... I am making sure to close the connection at the end of each DB ...
    (comp.lang.php)