Re: [PHP-DB] Re: mysql query
Ethan Rosenberg wrote: I'm probably wrong, but in some contexts; eg, sql query, $ signs are not used. I tried and added the incorrect $ sign, and Netbeans did not complain. If anyone knows of an editor that will able to spot this kind of error, please inform the list. You do need to take a little more care when using variables IN strings and watch that they are highlighted. As you say, the parsing is not actually wrong as it is valid 'text' and adding SQL parsers for every database is not really practical and probably would not fix the problem anyway? Personally I use Firebird, and have always built the SQL using parameters, so that the SQL is pure text, and values are passed in an array. This is something MySQL was a lot later in catching onto, but many of the simple security problems are totally eliminated using that approach. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Bluefish for PHP
Simply install wamp server and save yourself from separate installation of MySQL,PHP,Apache server,phpMyAdmin and sqlite. Check the link below. http://wampserver.com On 23 August 2013 01:29, Ethan Rosenberg erosenb...@hygeiabiomedical.comwrote: Dear List - How do I configure Bluefish for PHP? I am running version 2.2.4 of Bluefish. TIA Ethan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Bluefish for PHP
Ethan Rosenberg wrote: Dear List - How do I configure Bluefish for PHP? I am running version 2.2.4 of Bluefish. I'd forgotten about bluefish. You should not need to do anything. PHP files are just processed as PHP? But it's more an HTML editor and geared to producing and verifying HTML so not as good when editing code. My Eclipse setup does a very similar job on the html/js and css so I've not used it in many years. I don't think the colour selections were very good if memory serves. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Bluefish for PHP
Install Komodo IDE or Adobe Dreamweaver. They'll highlight errors and warnings. On 23 August 2013 08:20, Lester Caine les...@lsces.co.uk wrote: Ethan Rosenberg wrote: Dear List - How do I configure Bluefish for PHP? I am running version 2.2.4 of Bluefish. I'd forgotten about bluefish. You should not need to do anything. PHP files are just processed as PHP? But it's more an HTML editor and geared to producing and verifying HTML so not as good when editing code. My Eclipse setup does a very similar job on the html/js and css so I've not used it in many years. I don't think the colour selections were very good if memory serves. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=**contacthttp://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.**ukhttp://rainbowdigitalmedia.co.uk -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: mysql query
If your on a PC I would just get Eclipse. But if you have netbeans, you can set the syntax highlighting for the different scripts you write in the preferences. PHP, java, javascript, etc... Best, Karl DeSaulniers Design Drumm http://designdrumm.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Bluefish for PHP
Komodo is very nice. Karl DeSaulniers Design Drumm http://designdrumm.com On Aug 23, 2013, at 2:58 AM, Michael Oki wrote: Install Komodo IDE or Adobe Dreamweaver. They'll highlight errors and warnings. On 23 August 2013 08:20, Lester Caine les...@lsces.co.uk wrote: Ethan Rosenberg wrote: Dear List - How do I configure Bluefish for PHP? I am running version 2.2.4 of Bluefish. I'd forgotten about bluefish. You should not need to do anything. PHP files are just processed as PHP? But it's more an HTML editor and geared to producing and verifying HTML so not as good when editing code. My Eclipse setup does a very similar job on the html/js and css so I've not used it in many years. I don't think the colour selections were very good if memory serves. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=**contacthttp://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.**ukhttp://rainbowdigitalmedia.co.uk -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Subject Matter
Hello all, I am subscribed to this list because of my interest in PHP's database integration. At this point only a small percentage of the messages are related to that. I am not sure who runs the list, whether they care about off-topic posts, or whether anyone else cares about it. I, however, do. Therefore, I would like to ask the group whether anyone else cares about this, or whether I should simply unsubscribe to reduce clutter in my inbox. One way or the other I would like to receive only messages of interest to me (i.e., those pertaining to the subject matter of the list I subscribed to). Thoughts appreciated. -Matt
Re: [PHP-DB] Subject Matter
On Fri, Aug 23, 2013 at 10:15 AM, Matt Pelmear mjpelm...@gmail.com wrote: Hello all, I am subscribed to this list because of my interest in PHP's database integration. At this point only a small percentage of the messages are related to that. I am not sure who runs the list, whether they care about off-topic posts, or whether anyone else cares about it. I, however, do. Therefore, I would like to ask the group whether anyone else cares about this, or whether I should simply unsubscribe to reduce clutter in my inbox. One way or the other I would like to receive only messages of interest to me (i.e., those pertaining to the subject matter of the list I subscribed to). Thoughts appreciated. -Matt The problem is: there is no maintainer;)
Re: [PHP-DB] Bluefish for PHP
Michael Oki wrote: Install Komodo IDE or Adobe Dreamweaver. They'll highlight errors and warnings. Last time I looked neither were free? Eclipse has served me well for many years and while it has it's problems often someone comes up with a new plugin to sort it. My problem is dealing with the errors and warnings in the third party libraries - it flags them as well :) -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: mysql query
Karl DeSaulniers wrote: If your on a PC I would just get Eclipse. But if you have netbeans, you can set the syntax highlighting for the different scripts you write in the preferences. PHP, java, javascript, etc... But the problem tha5 has been identified will never be flagged by simple highlighting. Debugging complex SQL queries is possibly better done outside of the PHP pages. Not sure exactly what SQL plug-in I've got running on Eclipse at the moment, but as Ethan identified earlier, the SQL script ran from the command line. It was passing the variables into it which was wrong. I'm with him on the statement that MySQL should have returned an error. Certainly Firebird would have done and so identifying the problem might have been easier. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Subject Matter
Matt Pelmear wrote: I am not sure who runs the list, whether they care about off-topic posts, or whether anyone else cares about it. The php lists are only loosely moderated, but comments like yours usually bring things under control. I'd refer you to my recent post thought as to why the current threads are not that far off topic ;) -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Subject Matter
On 08/23/2013 04:36 PM, Lester Caine wrote: Matt Pelmear wrote: I am not sure who runs the list, whether they care about off-topic posts, or whether anyone else cares about it. The php lists are only loosely moderated, but comments like yours usually bring things under control. I'd refer you to my recent post thought as to why the current threads are not that far off topic ;) Indeed, that thread is one that is on topic... but I think the signal-to-noise ratio on this list is rather poor ;) If I'm the only one bothered by it, it's no big deal for me to unsubscribe... I just thought I'd check the general opinion first. I don't run into these problems on the internals list... :-) -Matt -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Subject Matter
Matt Pelmear wrote: On 08/23/2013 04:36 PM, Lester Caine wrote: Matt Pelmear wrote: I am not sure who runs the list, whether they care about off-topic posts, or whether anyone else cares about it. The php lists are only loosely moderated, but comments like yours usually bring things under control. I'd refer you to my recent post thought as to why the current threads are not that far off topic ;) Indeed, that thread is one that is on topic... but I think the signal-to-noise ratio on this list is rather poor ;) If I'm the only one bothered by it, it's no big deal for me to unsubscribe... I just thought I'd check the general opinion first. I don't run into these problems on the internals list... :-) In reality there are probably too many lists and none are policed particularly well. My email setup strips each to it's own folder so I can simply ignore things if I want, but occasionally something pops up which needs redirecting. We have a firebird php list which handles the firebird and interbase drivers so those sort of enquiries get redirected. But I must have a clean out some time. The first message on this list is 1999 ... and I have some older lists still archived :) -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: mysql query
On 8/22/2013 8:08 PM, Ethan Rosenberg wrote: Ethan Rosenberg, PhD /Pres/CEO/ *Hygeia Biomedical Research, Inc* 2 Cameo Ridge Road Monsey, NY 10952 T: 845 352-3908 F: 845 352-7566 erosenb...@hygeiabiomedical.com On 08/22/2013 06:56 PM, Jim Giner wrote: On 8/22/2013 4:14 PM, Ethan Rosenberg wrote: On 08/22/2013 11:54 AM, Jim Giner wrote: On 8/22/2013 9:52 AM, Jim Giner wrote: On 8/21/2013 7:48 PM, Ethan Rosenberg wrote: Dear List - I can't figure this out mysql describe Inventory; +-+-+--+-+-+---+ | Field | Type| Null | Key | Default | Extra | +-+-+--+-+-+---+ | UPC | varchar(14) | YES | | NULL | | | quant | int(5) | NO | | NULL | | | manuf | varchar(20) | YES | | NULL | | | item| varchar(50) | YES | | NULL | | | orderpt | tinyint(4) | NO | | NULL | | | ordrpt_flag | tinyint(3) | YES | | NULL | | | stock | int(3) | YES | | NULL | | +-+-+--+-+-+---+ Here are code snippets - $upc = $_SESSION['UPC']; $qnt = $_POST['quant']; $mnf = $_POST['manuf']; $itm = $_POST['item']; $odrpt = $_POST['oderpt']; $opf = $_POST['ordrpt_flag']; $stk= $_POST['stock']; $sql2 = insert into Inventory (UPC, quant, manuf, item, orderpt, ordrpt_flag, stock) .values ('$upc', $qnt,'$mnf','$itm', odrpt, 0, $stk); $result2 = mysqli_query(cxn, $sql2); echo '$sql2br /'; print_r($sql2); echo br /$upc $qnt $mnf $itm $odrpt $opf $stkkbr /; if (!$result2) die('Could not enter data: ' . mysqli_error()); The mysql query fails. I cannot figure out why. It works from the command line. TIA Ethan Ethan - you are simply missing two dollar signs as pointed out. Once you correct them, if there are any more errors you should then be seeing the message from mysqli_error. And as for the advice to dump single quotes, I'd ignore it. The use of double and single quotes is a very handy feature and makes for very readable code. Escaping double quotes is such a royal pia and makes for more trouble deciphering code later on. The sample you provided for us is some of the best and most understandable code you've ever showed us. Also - Ethan - if you used an editor that was designed for php you probably would have seen these missing $ signs since a good one would highlight php syntax and the lack of the $ would have produced a different color than you expected. Jim - I used Netbeans. All it said is variable unused is scope, which is a error that I often find does not mean anything. I am as pressurized as you are. Any suggestions as to an editor? Ethan Did you mean to say unused IN scope? That would be telling you that it is not yet defined and that could be a problem if you expect to be already defined. Several other posts here have listed their favorites. Notepad ++ seems to be a favorite. I use HTML-kit Tools as my developing environment. Handles highlighting for php, html and js, as well as project organization. Also includes an ftp engine to allow me to modify, upload and then go test my code very quickly. (I don't run php or apache locally.) Jim - Thanks. unused IN scope - correct. There are lots of editors mentioned in this email trail. I thank all for the suggestions. Netbeans, Aptana Studio, etc will all highlight code and show the errors the code would generate in a browse. The problem here was two missing $ signs. I'm probably wrong, but in some contexts; eg, sql query, $ signs are not used. I tried and added the incorrect $ sign, and Netbeans did not complain. If anyone knows of an editor that will able to spot this kind of error, please inform the list. Ethan Wrong in one sense - all php vars must have a $ sign. When building a query statemtent, if the editor doesn't tell you something (by not colorizing it) Sql is going to tell you when you attempt to run it. That's why one should ALWAYS include an error check after any operation. BTW - this line echo '$sql2br /'; isn't going to give you what you want. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: mysql query
On 8/23/2013 4:32 AM, Lester Caine wrote: Karl DeSaulniers wrote: If your on a PC I would just get Eclipse. But if you have netbeans, you can set the syntax highlighting for the different scripts you write in the preferences. PHP, java, javascript, etc... But the problem tha5 has been identified will never be flagged by simple highlighting. Debugging complex SQL queries is possibly better done outside of the PHP pages. Not sure exactly what SQL plug-in I've got running on Eclipse at the moment, but as Ethan identified earlier, the SQL script ran from the command line. It was passing the variables into it which was wrong. I'm with him on the statement that MySQL should have returned an error. Certainly Firebird would have done and so identifying the problem might have been easier. I think the reason he didn't get the error was cause of his lack of a connection which never allowed it to run. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Subject Matter
On 8/23/2013 4:52 AM, Matt Pelmear wrote: On 08/23/2013 04:36 PM, Lester Caine wrote: Matt Pelmear wrote: I am not sure who runs the list, whether they care about off-topic posts, or whether anyone else cares about it. The php lists are only loosely moderated, but comments like yours usually bring things under control. I'd refer you to my recent post thought as to why the current threads are not that far off topic ;) Indeed, that thread is one that is on topic... but I think the signal-to-noise ratio on this list is rather poor ;) If I'm the only one bothered by it, it's no big deal for me to unsubscribe... I just thought I'd check the general opinion first. I don't run into these problems on the internals list... :-) -Matt Funny - I never knew this list was handling off-topic posts that regularly. I always thought this list was about using php to access database info and the problems incurred, such as Ethan's recent post about his bad query code. So - this is supposed to be about database integration? I'll have to reconsider my subscription choice as well, just as soon as I look up whatever the heck that is. :) -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] PHP5 with Solid 3.0
Hi all, We really seem to have a problem: We have an old server running PHP4 and a Solid database 3.0. That combination still works fine after so many years. Unfortunately the hardware it's running on starts to let us down. On quite short notice we need to have a stable solution. We hired someone to try and put it all on a VPS going to an updated OS, Apache and also to PHP5. Everything fine, but he doesn't seem to get the Solid ODBC driver (2.5) going with PHP5. Given the complexity of the system (in PHP and Perl) we need to stay on Solid 3.0 for now (later on we will try and move over to e.g. MySQL). Does anyone have any experience with getting a legacy Solid db to work with PHP5 under Debian (7)? Or any tips/tricks regarding that? For now it seems the odbc driver cannot be compiled due to incompatible pointer types. Thanks! Renze -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Subject Matter
On Aug 23, 2013, at 7:32 AM, Jim Giner jim.gi...@albanyhandball.com wrote: On 8/23/2013 4:52 AM, Matt Pelmear wrote: On 08/23/2013 04:36 PM, Lester Caine wrote: Matt Pelmear wrote: I am not sure who runs the list, whether they care about off-topic posts, or whether anyone else cares about it. The php lists are only loosely moderated, but comments like yours usually bring things under control. I'd refer you to my recent post thought as to why the current threads are not that far off topic ;) Indeed, that thread is one that is on topic... but I think the signal-to-noise ratio on this list is rather poor ;) If I'm the only one bothered by it, it's no big deal for me to unsubscribe... I just thought I'd check the general opinion first. I don't run into these problems on the internals list... :-) -Matt Funny - I never knew this list was handling off-topic posts that regularly. I always thought this list was about using php to access database info and the problems incurred, such as Ethan's recent post about his bad query code. So - this is supposed to be about database integration? I'll have to reconsider my subscription choice as well, just as soon as I look up whatever the heck that is. :) This is the description on www.php.net/mailing-lists.php: Databases and PHP This list is for the discussion of PHP database topics Nothing more specific than that. I, personally, don't know of any PHP databases, so I'm going to assume it means the broader interpretation of using PHP with databases. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php