PHP - Trying to add sha() inside a sql query

Ask a Question related to Macromedia Dynamic HTML, Design and Development.

  1. #1

    Default PHP - Trying to add sha() inside a sql query

    Hey guys/gals, i cant seem to get the following line to work. I know i've
    stuffed up the commas. I Can't remember which way i supposed to use the '
    and "

    $insertMember = "INSERT INTO members (username, pwd) VALUES
    ('$username','".sha1('$pwd')."'");

    thansks in advance


    ....hooligan Guest

  2. Similar Questions and Discussions

    1. trouble with loop inside output query
      Hello EveryOne, The following code executes without problem: SIZE: <cfset size="#product_size#"> <form> <select name="select"> <cfloop...
    2. dump query inside a cfmail tag
      I am stuck using cf 4 so keep that in mind. I am trying to get the results of a query dropped into the body of a cfmail tag. Can't use cfdump. ...
    3. cfgrid inside a <cfoutput query="myQuery" group="GROUP">
      Is it possible to use a cfgrid inside a cfoutput with a query and a group. When I try do that I get the following error: INVALID_CHARACTER_ERR:...
    4. query of queries inside cffunction
      Hi im trying to use the benifits of query of queries, but cannot get it to work...Im calling a cffunction inside a cfc (mx) from flash.mx here is my...
    5. Dynamic temp. datagrid col.gen. -Session access inside a class inside a UserCtrl
      Hello Dear Professionals: Based on this document:...
  3. #2

    Default Re: PHP - Trying to add sha() inside a sql query

    Your last double quote mark should be outisde that last bracket I think!

    .....hooligan wrote:
    > Hey guys/gals, i cant seem to get the following line to work. I know
    > i've stuffed up the commas. I Can't remember which way i supposed to
    > use the ' and "
    >
    > $insertMember = "INSERT INTO members (username, pwd) VALUES
    > ('$username','".sha1('$pwd')."'");
    >
    > thansks in advance

    rob::digitalburn Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139