[PHP-DB] MYSQLi fetch corrupting bound variables

2011-08-25 Thread Stuart Milne
Hi there Getting a weird issue with MySQLi fetch when using bound variables. First of all here is some example code. prepare('SELECT `id`, name FROM MYTABLE WHERE id = ?) { if ($stmt->bind_param('i', $pID)) { if ($stmt->bind_result($recordID, $name) { if ($stmt->execute()) { $stmt->fe

[PHP-DB] Re: [PHP] Re: [PHP-DB] Re: [PHP] Re: [PHP-DB] Re: [PHP] PHP EOL

2011-07-04 Thread Stuart Dallas
On Mon, Jul 4, 2011 at 7:11 AM, Karl DeSaulniers wrote: > Hello Stuart, > After some closer look at the RFC Compliant manuals you suggested, > I have determined that the creator of that code was in fact RFC821 > Compliant. > Being that this was a code I found several years ago,

[PHP-DB] Re: [PHP] Re: [PHP-DB] Re: [PHP] PHP EOL

2011-07-03 Thread Stuart Dallas
On Sun, Jul 3, 2011 at 11:22 PM, Karl DeSaulniers wrote: > @Stuart, > Actually that is what made me look into the PHP_EOL Stuart. Wanting to do > things right. > Did you not read my initial email? I am not suggesting anyone adopt my > code. > The question was directed to what t

[PHP-DB] Re: [PHP] PHP EOL

2011-07-03 Thread Stuart Dallas
you accept" - if it wasn't like that the internet would fall apart. I encourage you to do your part to do things right, but it's completely up to you if you don't want to follow the users' manual. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ On Jul 2, 2011, at 8

[PHP-DB] Re: [PHP] PHP EOL

2011-07-02 Thread Stuart Dallas
mented mail servers (rare these days, but it happens). Incidentally, CR only applies to Mac OS9 and earlier. OSX uses LF due to its BSD roots. For a near-complete list, see "Representations" here: http://en.wikipedia.org/wiki/Newline. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP-DB] local queries vs remote queries

2006-09-19 Thread Stuart Kendrick
hi chris, right. if i run 'psql -d soma' and then type the first SELECT, i get results ... if i type the second SELECT, i get zero rows. this seemed odd to me ... i wouldn't think that postgres would care. but perhaps it does hmm. ok, i just tried this again ... and now i'm getting resul

[PHP-DB] local queries vs remote queries

2006-09-14 Thread Stuart Kendrick
p Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies production> cd /usr/share/pear production> grep -i version DB.php [...] * @version Release 1.7.6 [...] v8.1.4 PostGreSQL. OpenSuSE 10.1 --sk stuart kendrick fhcrc -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] local queries vs remote queries

2006-09-13 Thread Stuart Kendrick
utput was a good first step ... encourages me to believe that my SQL syntax is correct and that my database contains data. what steps might i take next, to figure out what is happening here? production> php -v PHP 4.3.10 (cli) (built: Mar 22 2005 19:34:44) Copyright (c) 1997-2004 The PHP Group Ze

Re: [PHP-DB] Given only one mySQL user account by Host Company

2005-01-23 Thread Stuart Felenstein
e account was allowed , that being the superuser i.e. all privelages. Stuart -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] values getting blown away

2005-01-15 Thread Stuart Felenstein
he same recordset and parameters and put them on another page , using a form with post /hidden values to pass the same values over. I've also tried posting to the same page. The weird thing is "code" and "$totalRows_rsLPINDS" come back empty. PN remains intact. Totally mind boggling. Stuart -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Update multiple records

2005-01-11 Thread Stuart Felenstein
ble for IndID like this : $IndID = $rsLPINDS->Fields('IndID'); which when I do a print_r($IndID), prints out the first record. So at this point I'm trying to figure out what I need to make $IndID an array. Stuart -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Update multiple records

2005-01-10 Thread Stuart Felenstein
Next(); } $rsInds->MoveFirst(); I've added this in the script, which prints out fine once I've submitted the page. Not sure if I need something similar for the records that already exist ? if (count($inds) > 0 AND is_array($inds)) { $ind = "'".implode(&

[PHP-DB] Update multiple records

2005-01-10 Thread Stuart Felenstein
Having a problem here with updating multiple records in a table. First the table is like such: +-+--+ | RecordID [int] | IndID [int] | +-+--+ There is no auto inc column. User has a record number and then can have multiple rows in tabl

Re: [PHP-DB] Update / Delete / Insert quandry

2005-01-06 Thread Stuart Felenstein
--- Andrew Kreps <[EMAIL PROTECTED]> wrote: > On Thu, 6 Jan 2005 07:28:32 -0800 (PST), Stuart > Felenstein > <[EMAIL PROTECTED]> wrote: > > > > The problem I'm having a hard time getting my > hands > > around are those areas where they can have >

[PHP-DB] Update / Delete / Insert quandry

2005-01-06 Thread Stuart Felenstein
well if many users though. Any suggestions ? Thank you, Stuart -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] stumped by "order by"

2004-12-19 Thread Stuart Felenstein
this one. Sounds like a lot of code. I'm not complaining :) > 2. storing the last used filter (i.e. the last given > set of WHERE clause > related values) in the session, a DB, file*** or > whatever in order to > remain state - in this case you need to retrieve the > valu

RE: [PHP-DB] stumped by "order by"

2004-12-19 Thread Stuart Felenstein
e where array is getting wiped out, values are gone. I get a "divison by zero" error. I'm assuming this is becasue the order by statement is issued with no parameters. Hope this makes sense and while I think it through perhaps someone has an idea of remedy. Stuart -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] stumped by "order by"

2004-12-19 Thread Stuart Felenstein
If I put it in the select statement , the it's out of place with the where clause. If I put it at the end of the where clause, obviously it is not seen. Any ideas how I can set this up correctly ? Stuart -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Dynamic where problem

2004-12-15 Thread Stuart Felenstein
break these particular "where" conditions off into a seperate array. Something like: $bWHERE = array(); then - $query_rsCS .= ' WHERE '.implode(' OR ',$bWHERE); Or is it possible there is another work around I'm not seeing yet ? Thanks in advance. Stuart -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] stumped-mail and database

2004-12-08 Thread Stuart Felenstein
--- Stuart Felenstein <[EMAIL PROTECTED]> wrote: > > --- Jason Wong <[EMAIL PROTECTED]> wrote: > > > > > Also just to be certain that you *are* running > those > > lines of code change the > > echo $to, to echo "Before $to" &

Re: [PHP-DB] stumped-mail and database

2004-12-07 Thread Stuart Felenstein
ere is something funky with the trigger. When I removed the trigger function - to = $rsVendorJobs->Fields('Conmail'); sent me an email and returned the correct value. So I'll now be debugging the trigger function to find out what is up. The road is never straight. Stuart -- PHP

Re: [PHP-DB] stumped-mail and database

2004-12-07 Thread Stuart Felenstein
$to; > Same thing: Call to a member function on a non-object in.. Stuart -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] stumped-mail and database

2004-12-07 Thread Stuart Felenstein
e page I can do a fields('Conmail');?> And it will echo out the correct value, But! as soon as I do a $to = $rsVendorJobs->fields('Conmail'); I get a "Fatal error: Call to a member function on a non-object in /ho...." So I tried adding global $

RE: [PHP-DB] stumped-mail and database

2004-12-06 Thread Stuart Felenstein
g(11) "Entry Clerk" ["JobTitle"]=> string(11) "Entry Clerk" [6]=> string(6) "A99839" ["OptRefCode"]=> string(6) "A99839" } ["blobSize"]=> int(100) ["canSeek"]=> bool(true) ["sql"]=> string(5

RE: [PHP-DB] stumped-mail and database

2004-12-06 Thread Stuart Felenstein
, although from your code > it should exactly > match a dump of $rsVendorJobs. > Yeah , the sql is cool Everything returns as expected. Stuart -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] stumped-mail and database

2004-12-06 Thread Stuart Felenstein
sVendorJobs); $rsVendorJobs = $->SelectLimit($query_rsVendorJobs) or die($->ErrorMsg()); $totalRows_rsVendorJobs = $rsVendorJobs->RecordCount(); // end Recordset %s = the JobID I've selected on the previous page and passed over with $_POST Hope this is enough. Not sure what else to send. Stuart -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] stumped-mail and database

2004-12-06 Thread Stuart Felenstein
'Conmail'); > > 2) change > $body = '$cl'; > To > $body = $cl; > Well I'm sure this is not the syntax, but since I've written it both ways I get a : Fatal error: Call to a member function on a non-object in /home/xxx/public_html/appjobb.php

RE: [PHP-DB] stumped-mail and database

2004-12-06 Thread Stuart Felenstein
e saying, how does that actually look ? Maybe something like this $myvar = select field from table where id = 2 ? Something as simple as that perhaps ? Stuart -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] stumped-mail and database

2004-12-06 Thread Stuart Felenstein
27;Conmail')"; $subject = $rsVendorJobs->Fields('RefEm'); $body = '$cl'; $headers = "From: [EMAIL PROTECTED]"; mail($to,$subject,$body,$headers); echo "Mail sent to $to"; } K...so you know this didn't work. I'm googling around but haven't

Re: [PHP-DB] Checkboxes on repeat regions

2004-12-06 Thread Stuart Felenstein
f the check box to: (and by the way, that is Adoob syntax, so don't let the value throw you) While it returns from the correct field it is not returning the correct record. I read somewhere to name checkbox as an array. checkbox[] Perhaps this is what I need to do. Stuart -- PHP Dat

Re: [PHP-DB] Checkboxes on repeat regions

2004-12-06 Thread Stuart Felenstein
es. Many articles, forum post, etc were about "deletes" and insertions using checkboxes. Stuart -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Checkboxes on repeat regions

2004-12-05 Thread Stuart Felenstein
r can choose this profile (check) and this document (check) hit submit and those are returned. I'm having no luck though and perhaps I'm unclear about the use of checkboxes or even radio buttons. Anyone understand how to accomplis this task ? Stuart -- PHP Database Mailing List (http://w

RE: [PHP-DB] Question: For no results

2004-12-03 Thread Stuart Felenstein
gt; No Matches > Found > exit; >} > e...cause I have no idea what i'm doing :) Not to be funny though, I'm at this 4 months , with no previous experience with php, any database and html. I think I'm slowly catching on. Code is no longer a fuzzy mess of char

RE: [PHP-DB] Question: For no results

2004-12-03 Thread Stuart Felenstein
here ? if ($row_rsCS == false) { exit; } Thank you Stuart -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] Question: For no results

2004-12-03 Thread Stuart Felenstein
--- Stuart Felenstein <[EMAIL PROTECTED]> wrote: > The reason the close is there is because the next > line > of code is the print_r , and I put some html in > there. > So this works great: if ($row_rsCS == false) { print_r ("No Matches Found"); exit; } But b

RE: [PHP-DB] Question: For no results

2004-12-03 Thread Stuart Felenstein
is point. > > You need to mark the block controlled by the if, > using either {-} or > :-endif, according to your taste. > The reason the close is there is because the next line of code is the print_r , and I put some html in there. Stuart -- PHP Database Mailing List (http:/

[PHP-DB] Question: For no results

2004-12-03 Thread Stuart Felenstein
(while the message is sharp and centered ;)), it is not to right place, since it sends the message and exits whether records / matches exist or not. Any suggestions ? Thank you Stuart $query_limit_rsCS = sprintf("%s LIMIT %d, %d", $query_rsCS, $startRow_rsCS, $maxRows_rsCS); //print_r($quer

Re: [PHP-DB] 5 hours later - sql error.

2004-12-03 Thread Stuart Felenstein
John! Your the man! It works! if (!empty(var)) Excellent. I think this is a good lesson in isset. I assumed they were the same. I guess reading the manual more would help. Thank you. Stuart > --- John Holmes <[EMAIL PROTECTED]> wrote: > > > You need to check if $stateRel

Re: [PHP-DB] 5 hours later - sql error.

2004-12-03 Thread Stuart Felenstein
t; we would have seen if you'd just posted the query... > I should probably ask - is this the way to use if(!empty(var)) ? Stuart -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] 5 hours later - sql error.

2004-12-03 Thread Stuart Felenstein
--- John Holmes <[EMAIL PROTECTED]> wrote: > Stuart Felenstein wrote: > > if(isset($stateReloc2)) $aWHERE[] = "Prof.State1 > IN > > ($stateReloc2)"; > > You need to check if $stateReloc2, etc are empty() > instead of set. > If the variable is s

Re: [PHP-DB] 5 hours later - sql error.

2004-12-03 Thread Stuart Felenstein
> > print_r($aWHERE); > > HTH > > Graham > Didn't do it. :( Stuart -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] 5 hours later - sql error.

2004-12-03 Thread Stuart Felenstein
--- Bastien Koert <[EMAIL PROTECTED]> wrote: > > can you post the code that creates the sql > statement > > bastien > I'm posting the entire script. I hope it comes through legible. If not I can do an attachment so the format, line breaks will remain. 0 AND is_array($taxType)) { $s_

Re: [PHP-DB] 5 hours later - sql error.

2004-12-03 Thread Stuart Felenstein
--- John Holmes <[EMAIL PROTECTED]> wrote: > Stuart Felenstein wrote: > Print out the entire query before you run it. Syntax > errors are usually > pretty obvious. If not, post the actual query here. I found one possible syntax error and fixed it though it seemed to ha

RE: [PHP-DB] 5 hours later - sql error.

2004-12-02 Thread Stuart Felenstein
.implode(' AND ',$aWHERE); Now I've printed out the query, but it only prints out right up to the where clause. To me it looks like the where clause is not taking correctly but I'm not sure why or how to know for usre. I'm tried print_r ($query_rsCS) but it's returnin

[PHP-DB] 5 hours later - sql error.

2004-12-02 Thread Stuart Felenstein
basically took this code from a search that is working - what I wonder is if the where statement is correct . Well let me start here and see. Thank you Stuart -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Basic JOIN tutorial - RE: [PHP-DB] Job interview test - I give up...

2004-12-01 Thread Stuart Felenstein
a left right , outter inner, full join. So, the builder gets all the other stuff out of the way, all the code, and would let you focus on the join type. A click of the mouse and you can switch the join type, run the query and see the difference in results. Kind of neat. Stuart -- PHP Database M

RE: [PHP-DB] Question on the use of where statements

2004-12-01 Thread Stuart Felenstein
he options - would that potentially make a huge hit on the system. Stuart -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Question on the use of where statements

2004-12-01 Thread Stuart Felenstein
Sorry ..hit the wrong button --- Stuart Felenstein <[EMAIL PROTECTED]> wrote: I posted this over on mysql list. Not trying to be redundant, but would like to get some feedback. Basically I'm wondering. I am creating a search form , dynamic query, that could potentially have in

[PHP-DB] Question on the use of where statements

2004-12-01 Thread Stuart Felenstein
I posted this over on mysql list. Not trying to be redundant, but would like to get some feedback. Basically I'm wondering. I am creating a search form , dynamic query, that could potentially have in the area of 40+ where statements. i.3. 1- where x = y and -- PHP Database Mailing List (http:

RE: [PHP-DB] Transaction suddenly not working

2004-11-29 Thread Stuart Felenstein
these fields are optional and in the db set to allow null. I went ahead and put '' around all the values so just in case. Though I know for a fact it was working without them before. Oh and yes it seems to be working now. Stuart -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] Transaction suddenly not working

2004-11-29 Thread Stuart Felenstein
1062 : Duplicate entry > '0-f' for key 1 > > And again on this line -- twice, in fact, since the > previous line ends with > a comma, too. > Mike are you saying that I should put single quotes around all values regardless of the type ? The double commas are h

Re: [PHP-DB] Transaction suddenly not working

2004-11-29 Thread Stuart Felenstein
--- Stuart Felenstein <[EMAIL PROTECTED]> wrote: One last thing to add on this issue. This table was created using tabletype InnoDB. Now I discovered earlier that this table and (many others) had switched over to MyISAM. I'm still trying to trace down the cause with my ISP. Anyw

Re: [PHP-DB] Transaction suddenly not working

2004-11-29 Thread Stuart Felenstein
d the Insert statement into a mysql gui it spit back a syntax error , apparently for the blank values ..,'', yet those are set to allow null. I went ahead and tried just an insert on the first 4 columns , that worked. Stuart -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Transaction suddenly not working

2004-11-29 Thread Stuart Felenstein
--- Stuart Felenstein <[EMAIL PROTECTED]> wrote: > I know recently the server was update from PHP 4.3.8 > to 4.3.9 but that shouldn't have effected anything. > > Code: > > $query = "INSERT INTO table1 (ProfileID, LurkID, > ProfileName, Ed

[PHP-DB] Transaction suddenly not working

2004-11-29 Thread Stuart Felenstein
unset($all session variable, $LID, ); }else{ ... Puzzling since this script was working great. We did also upgrad MySQL from 4.0.21 to 4.0.22-standard Thank you, Stuart -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] Updating count on record results

2004-11-19 Thread Stuart Felenstein
x27;", $link); > Where did this code go though ? Meaning, was it in a seperate script / page or was it part of a bigger query that first got the results based on certain criteria , the did the update? Stuart -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Updating count on record results

2004-11-19 Thread Stuart Felenstein
is set too 3) ...etc. So I have a vauge idea of the sql statement but where to place is the question. My thoughts are that it should be in the loop that generates the result rows return. In other words - Maybe here : Or maybe here ?: Hope what I'm asking is clear. Thank you , S

[PHP-DB] [SOLVED]Re: [PHP-DB] Search results page not working with table joins

2004-10-25 Thread Stuart Felenstein
--- Stuart Felenstein <[EMAIL PROTECTED]> wrote: > I have a search page and a results page. It's a > dynamic search. It works great with just the main > table, but as soon as I add in the table joins (to > translate the codes) it just dumps out all the > record

[PHP-DB] Search results page not working with table joins

2004-10-25 Thread Stuart Felenstein
I have a search page and a results page. It's a dynamic search. It works great with just the main table, but as soon as I add in the table joins (to translate the codes) it just dumps out all the records regardless of criteria. Here is the script without the joins: http://www.w3.org/TR/html4/lo

[PHP-DB] Question: Copy and paste text into mysql text column

2004-10-19 Thread Stuart Felenstein
I have a textarea field that will allow users to copy and paste text into , it might be plain text, or it might come out of word. I'm wondering what type of validations I should perform on this field ? Any suggestions / ideas ? Thank you, Stuart -- PHP Database Mailing List

RE: [PHP-DB] Question: Putting separate form elements into an array

2004-10-17 Thread Stuart Felenstein
Sorry about the two lists. The echo's are fine. The problem was iterating through the 3 arrays. Stuart --- Graham Cossey <[EMAIL PROTECTED]> wrote: > Stuart, now I'm confused. > > You seem to be posting slightly different versions > of problems relating to >

RE: [PHP-DB] Question: Putting separate form elements into an array

2004-10-17 Thread Stuart Felenstein
Changed my direction somewhat but keep getting a parse error and although I know where it is , I can't seem to figure out what I need to do to make it syntax correct: This is how I am passing the arrays: if ( empty( $_SESSION['l_skill'] ) ) { $_SESSION['l_skill']=array(); } if ( is_array( $_REQU

RE: [PHP-DB] Question: Putting separate form elements into an array

2004-10-17 Thread Stuart Felenstein
to nest all the "if ( is_array" but that produced some funky loop. So then I formatted as aboved. Problem is all i'm getting is the last element from each array into the database. I'm thinking then, perhaps not nested , but the if is arrays need to be formatted differently. Stuart --- Graham Cossey <[EMAIL PROTECTED]> wrote: -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] Question: Putting separate form elements into an array

2004-10-16 Thread Stuart Felenstein
See interspersed: --- Graham Cossey <[EMAIL PROTECTED]> wrote: > Have you tried naming your form elements such as > skill[], sky[] and slu[] ? > (You could also use skill[1], skill[2], skill[3] > etc... within your form.) Yes that makes sense. > You can just as easily store the arrays in your

[PHP-DB] Question: Putting seperate form elements into an array

2004-10-16 Thread Stuart Felenstein
($i+1).'a']); if (!empty($HTTP_SESSION_VARS['f41'.($i+1).'a'])){ $_SESSION('skil', $_SESSION['f41'.($i+1).'a']); $_SESSION('yrs', $_SESSION['f41'.($i+1).'b']);

RE: [PHP-DB] Transactions - working but unsure about steps

2004-10-16 Thread Stuart Felenstein
I had that suspicion that I was only calling it for the last query. Thank you for confirming and for the code! Much appreciated. Stuart --- Graham Cossey <[EMAIL PROTECTED]> wrote: > Stuart, you are calling your rollback function only > if $result is false. > > This check

Re: [PHP-DB] Transactions - working but unsure about steps

2004-10-16 Thread Stuart Felenstein
until I have a better understanding of PHP plain but I think it's worth looking into . I've also considered Adodb with "smart transactions". Stuart -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Transactions - working but unsure about steps

2004-10-16 Thread Stuart Felenstein
user input into form, my validations will be in the form. I've also thought about checking for effected rows and then if == 0 , stopping the transaction, but that seems redundant to what I believe is the way mysql transactions should work. Stuart --- Martín Marqués <[EMAIL PROTECTED

[PHP-DB] Transactions - working but unsure about steps

2004-10-16 Thread Stuart Felenstein
My statements are all working but I'm not sure if things are set up correctly. I say this because at one point the first $query failed, yet the rest of inserts wre committed. Now I believe I need to set autocommit to 0 , yet the query failed due to a syntax error. Hence 0 records effected wouldn'

Re: [PHP-DB] Array and insert statement throws error

2004-10-15 Thread Stuart Felenstein
You also > need to have the database function to insert into > the database. > Assuming it MySQL: > ... > foreach(...) { > $query = "INSERT INTO ..."; > mysql_query($query); > } > > On Oct 15, 2004, at 4:40 PM, Stuart Felenstein > wrot

Re: [PHP-DB] Array and insert statement throws error

2004-10-15 Thread Stuart Felenstein
Actually it did just loop. I need to test again. The insert statement is the the one $query = So it's after yes, but contained in the braces, like you diagram below. Stuart --- "Matt M." <[EMAIL PROTECTED]> wrote: > where is your insert statement? I am guessing

Re: [PHP-DB] Array and insert statement throws error

2004-10-15 Thread Stuart Felenstein
Yep, I had found it shortly before. Only it's not looping. It is taking last value only. Stuart --- "Matt M." <[EMAIL PROTECTED]> wrote: > if ( is_array( $_SESSION['l_industry'] ) ) { > foreach ( $_SESSION['l_industry'] as $p ) { >

Re: [PHP-DB] Array and insert statement throws error

2004-10-15 Thread Stuart Felenstein
Where would that go? Stuart --- "Matt M." <[EMAIL PROTECTED]> wrote: > > if ( is_array( $_SESSION['l_industry'] ) ) { > > foreach ( $_SESSION['l_industry'] as $p ) > { > > $query = "INSERT INTO Profiles_Industries > (Profi

[PHP-DB] Array and insert statement throws error

2004-10-15 Thread Stuart Felenstein
#x27;l_industry'] ) ) { foreach ( $_SESSION['l_industry'] as $p ) { $query = "INSERT INTO Profiles_Industries (ProfileID, IndID) VALUES ($LID, $p)"; } Stuart -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Help: Transactions working but question / issue

2004-10-15 Thread Stuart Felenstein
hoping for suggestions. Thank you Stuart --- John Holmes <[EMAIL PROTECTED]> wrote: -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Help: Transactions not working

2004-10-15 Thread Stuart Felenstein
John, Big thank you! for your help. I had been trying out the mysql_insert_id and was not having luck. It's working great (with just a few more bumps to get over). --- John Holmes <[EMAIL PROTECTED]> wrote: > Stuart Felenstein wrote: > > > But - I want to co

Re: [PHP-DB] Help: Transactions not working

2004-10-15 Thread Stuart Felenstein
as an auto-inc column. So I'm thinking then the third insert will get the LAST_INSERT_ID from table 2 / 2nd insert. Perhaps I need to declare it the first time as a value (app code) or add "where" conditions to all the subsequent insertions ? Thank you, Stuart --- John Holmes

[PHP-DB] Help: Transactions not working

2004-10-15 Thread Stuart Felenstein
If you see the code I have the begin , then the $query follows. With both statements present, only the second one does the insert. If I // or remove the second, the first one takes. Am I missing something here ? Stuart Code: function begin() { mysql_query("BEGIN"); } funct

Re: [PHP-DB] Converting Date for mysql

2004-10-15 Thread Stuart Felenstein
Yes, my apologies to the list! Stuart --- David Robley <[EMAIL PROTECTED]> wrote: > May I suggest that as well as echoing mysql_error() > you also echo your > query; that way you can see _exactly_ what is being > passed to mysql and you > can resolve problems like th

Re: [PHP-DB] Converting Date for mysql

2004-10-15 Thread Stuart Felenstein
$f3j, $f3k, $f3l)"; Outside of the date I don't see where the error could be coming from. Fields with quotes are string values. I have no idea. Stuart -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Converting Date for mysql

2004-10-14 Thread Stuart Felenstein
_POST['DateAvailable']; to $_SESSION['f3k'] = date('Y-m-d', mktime(0,0,0,substr(3,5,$_POST['newdate']), substr(0,2,$_POST['newdate']), substr(6,10,$_POST['newdate']))); I now tried to pass 'newdate' into

RE: [PHP-DB] mysql error and resource ID:

2004-10-14 Thread Stuart Felenstein
Yes, actually my apologies to everyone. I figured out the error. So , yep, I'm down to a problem with the date. The column is set to date. I'll go ahead and add the quotes. Stuart --- [EMAIL PROTECTED] wrote: > Stuart, > > The date has forward slashes. These are not &g

RE: [PHP-DB] mysql error and resource ID:

2004-10-14 Thread Stuart Felenstein
s //needed though it doesn't make a diff begin(); // transaction begins $result = mysql_query($query); --- Stuart Felenstein <[EMAIL PROTECTED]> wrote: -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] mysql error and resource ID:

2004-10-14 Thread Stuart Felenstein
Quote as in "string" or quote as in 'string' ? Those two confuse me. Stuart --- [EMAIL PROTECTED] wrote: > If any of the variables used to insert data are > strings ($f1a, $f2a, > etc...), you'll need to have quotes around them. > > dave > > >

RE: [PHP-DB] mysql error and resource ID:

2004-10-14 Thread Stuart Felenstein
to use near 'id #2). I think this means the second ID column in the table? Stuart --- Graham Cossey <[EMAIL PROTECTED]> wrote: > Stuart, you need to define $link if you're going to > use it ;) > > > > > Not much luck here on placing the > mysql_error($link

RE: [PHP-DB] mysql error and resource ID:

2004-10-14 Thread Stuart Felenstein
Not much luck here on placing the mysql_error($link); I know the server and database is reachable. So I imagine the error is happening in the query. I've moved the $link around with no luck. Stuart Revised code below: --- Graham Cossey <[EMAIL PROTECTED]> wrote: -- PHP Datab

[PHP-DB] mysql error and resource ID:

2004-10-14 Thread Stuart Felenstein
First time setting something like this up. So probably making some major mistakes. Anyway I get this message : "mysql_error(Resource id #2)" I know it's pointing me to something but not sure what . My suspicion since I'm driving blind :) is that I'm attempting an insert using invalid or incorrect

RE: [PHP-DB] Transactions ....[was]: MySQL, Multiple tables............

2004-10-14 Thread Stuart Felenstein
/ user input exists. If it didn't then fail before start. But my main concern is if after this first committ and errors occur, is rollback to late on the MainTable ? Stuart --- Bastien Koert <[EMAIL PROTECTED]> wrote: > If you are usiing the INNOdb table type/engine in > the

[PHP-DB] MySQL, Multiple tables, and Multipage form using sessions

2004-10-13 Thread Stuart Felenstein
Are there any tutorials , good books that go into this type of depth ? Is it really simple and Im just scared ? :) I'm open to listening , Thank you , Stuart -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Don't mean to be repetitive - Session Variables

2004-10-11 Thread Stuart Felenstein
I apologize, fixed this problem a short while ago. I need to move the post statement a page ahead. Now all is working fine. Thank you , Stuart --- [EMAIL PROTECTED] wrote: > Have you assigned the values in the > $_SESSION['l_industry'] array to those > specific local var

[PHP-DB] Suggestions for record insertion

2004-10-11 Thread Stuart Felenstein
7;m guessing that for whatever reason, insert into say the 3rd table failed, it's going to take a decent amount of code to delete the records from the first 2 tables ? Basically I'm open to any ideas on this, while I search out the manual. Thank you Stuart -- PHP Database Mailing L

Re: [PHP-DB] Don't mean to be repetitive - Session Variables

2004-10-11 Thread Stuart Felenstein
; echo $l_industry['2'].""; echo $l_industry['3'].""; echo $l_industry['4'].""; echo $l_industry['5'].""; Thank you, Stuart -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Don't mean to be repetitive - Session Variables

2004-10-11 Thread Stuart Felenstein
Jason, thank you for all the help today! It's all working now. However, warning: I maybe back when I try to slam it all into the database. Stuart --- Jason Wong <[EMAIL PROTECTED]> wrote: > On Monday 11 October 2004 19:42, Stuart Felenstein > wrote: > > I think I fou

Re: [PHP-DB] Don't mean to be repetitive - Session Variables

2004-10-11 Thread Stuart Felenstein
I think I found the correct way. By registering the session variable in the "next" page is how they take. Form Page 1 - collect user input Form Page 2 - $_SESSION['name'] = $POST['myane']; This sound right? Stuart --- Stuart Felenstein <[EMAIL PROTECTED]>

Re: [PHP-DB] Don't mean to be repetitive - Session Variables

2004-10-11 Thread Stuart Felenstein
;"> or is that where my mistake is happening ? MyName is the value not the variable so I think this is the right way to register the variable: $_SESSION['name'] = $_POST['myname']; Maybe I leave the value blank and rely on the field name ? Stuart > > -- > J

Re: [PHP-DB] Don't mean to be repetitive - Session Variables

2004-10-11 Thread Stuart Felenstein
= 'something'; // to register > a session variable Alright , I guess the light isn't shining through here. 'Something' is setting the variable to something the user can change with the form input ? Stuart -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Don't mean to be repetitive - Session Variables

2004-10-11 Thread Stuart Felenstein
et the funtion) to see if $myname is a registered session value and it returns 1 (true), so what gives ? Thank you Stuart -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Form values

2004-10-09 Thread Stuart Felenstein
oveFirst(); ?> So the php is doing the feed of the dynamic table, but I have no idea where to set the session variable. It's not an array, but does it get treated like one ? Stuart -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Help: Arrays with Session Variables not happening

2004-10-08 Thread Stuart Felenstein
K ..my problem seems to be combining echo on the menu values with the print array. If I echo $array[0]; that seems to work fine !? Stuart --- Stuart Felenstein <[EMAIL PROTECTED]> wrote: > Back again , sorry :) > > I had my form set up with 7 multi selects , on the >

[PHP-DB] Help: Arrays with Session Variables not happening

2004-10-08 Thread Stuart Felenstein
Back again , sorry :) I had my form set up with 7 multi selects , on the return page, all 7 arrays were returned correctly. Now that I've changed back 5 to regular menu selects (1 selection), the 2 arrays left won't return the values. The menus work fine. Here is my code: Page 1: Page 2

  1   2   3   >