Results 1 to 3 of 3

Thread: [resolved] where clause

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2004
    Posts
    121

    Resolved [resolved] where clause

    Hello all.
    This is my first try at a WHERE clause with PHP.
    What I need is the syntax for retrieving the correct record and printing it on the page.
    Any help is appreciated.
    Many thanks.
    Code:
    if (!$conn = new COM("ADODB.Connection")) exit("Unable to create an ADODB connection.");
    	$strConn = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" . realpath("..\db\users.mdb");
    	$conn->open($strConn);
    	$sql = "SELECT username FROM users WHERE 'username==$_POST[lstUser]'";
    	$rs = $conn->execute($sql);
    
    		// Need something here
    		// Print result here
    
    	$rs->Close();
    	$conn->Close();
    	$rs = null;
    	$conn = null;
    Last edited by solitario; May 27th, 2005 at 02:55 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width