f



Best way to get quoted text in mysql?

It took me a lot of trial and error to get text from an HTML form into MySQL to
account for quotation marks being entered. I came up with the following. It
works fine but I was wondering if this is the best way. Here are the relevant
snippets:

1) User enters data via post.html:

   <form method="POST" action="post_confirm.php" name="form">
   <textarea NAME="comments" ROWS=4 COLS=60 onkeyup="textLimit(comments,
800);"></TEXTAREA>
   <input type="submit" name="Submit2" value="Submit" onClick="return
validate(form)">
   </form>

2) User is presented with the confirmation form post_confirm.php:

    Strips html tags, and displays without the slashes that PHP puts in:
        <?php $comments=stripslashes(strip_tags($_POST['comments'])); ?>

    Displays the user comments:
        <?php echo $comments; ?>

    If ok, user sends it to be posted:
   <form method="POST" action="postnotice.php">
      <input type="hidden" name="comments" value="<?php echo
htmlspecialchars($comments, ENT_QUOTES ); ?>">
   </form>

3) Stuff is posted in MySQL via postnotice form:

    <?php $comments=addslashes($_POST['comments']); ?>


Better way or OK?

TIA -

jon


-- 
jwayne@_myrealbox_no_spam.com
0
JW
6/30/2003 8:05:12 PM
comp.lang.php 32646 articles. 0 followers. Post Follow

3 Replies
414 Views

Similar Articles

[PageSpeed] 10

Hi jwayne!

On Mon, 30 Jun 2003 16:05:12 -0400, JW <jwayne@_myrealbox_no_spam.com>
wrote:

>It took me a lot of trial and error to get text from an HTML form into MySQL to
>account for quotation marks being entered. I came up with the following. It
>works fine but I was wondering if this is the best way. Here are the relevant
>snippets:
>
>1) User enters data via post.html:
>
>   <form method="POST" action="post_confirm.php" name="form">
>   <textarea NAME="comments" ROWS=4 COLS=60 onkeyup="textLimit(comments,
>800);"></TEXTAREA>
>   <input type="submit" name="Submit2" value="Submit" onClick="return
>validate(form)">
>   </form>
>
>2) User is presented with the confirmation form post_confirm.php:
>
>    Strips html tags, and displays without the slashes that PHP puts in:
>        <?php $comments=stripslashes(strip_tags($_POST['comments'])); ?>
You can turn of the slashes that are put in, by using the ini_set with
magic_quotes_gpc. My suggestion is to turn it off.

>
>    Displays the user comments:
>        <?php echo $comments; ?>
>
>    If ok, user sends it to be posted:
>   <form method="POST" action="postnotice.php">
>      <input type="hidden" name="comments" value="<?php echo
>htmlspecialchars($comments, ENT_QUOTES ); ?>">
>   </form>
>
>3) Stuff is posted in MySQL via postnotice form:
>
>    <?php $comments=addslashes($_POST['comments']); ?>
>
>
>Better way or OK?
>

You may get around the one stripslashes with my suggestion.

Hope I could help.

Jochen
-- 
Jochen Daum - CANS Ltd.
PHP DB Edit Toolkit -- PHP scripts for building
database editing interfaces.
http://sourceforge.net/projects/phpdbedittk/
0
jochen.daum (206)
6/30/2003 9:27:42 PM
Hi !
On Mon, 30 Jun 2003 20:18:23 -0400, JW <jwayne@_myrealbox_no_spam.com>
wrote:

>
>>You may get around the one stripslashes with my suggestion.
>>
>I tried your suggestion but there is problem: when I do a mysql_query, it bombs
>with _single_ quotes in the user text.  
>
Sorry. Just remove one instance of stripslashes, not all instances of
*slashes. But your code was fine anyway. If you use shared servers,
you might not be in control of these switches anyway. Maybe have a
look at get_magic_quotes_gpc.

HTH, Jochen
-- 
Jochen Daum - CANS Ltd.
PHP DB Edit Toolkit -- PHP scripts for building
database editing interfaces.
http://sourceforge.net/projects/phpdbedittk/
0
jochen.daum (206)
7/1/2003 12:38:50 AM
Jochen Daum <jochen.daum@cans.co.nz> wrote in message news:<lma1gv4q60lef5gtd6506n19q7kpjcqc7v@4ax.com>...
> >Better way or OK?

There is a RemoveMagicQuotes function floating around, probably on
php.net in the user comments that I've found to be very effective. You
just run it on the top of every page and it removes the magic quotes
if the server has them on or off. I've moved PHP scripts between
hosting companies and it can suddenly make a working script, not work.
A little auto-detection and dealing with it can help.
0
7/1/2003 12:53:13 AM
Reply:

Similar Artilces:

"Best" way to get mail folder contents
Asking this one for a friend. He has a shell account that he logs into that allows him to access his POP3 e-mail via Pine. However, the folders are _not_ stored on that machine (so he can't simply scp the folders). He'd like to fully copy the contents of each folder, in the most efficient way possible, to new mail folders (which will be stored on an IMAP server). He doesn't want to delete the old folders, just copy the contents to new folders. Is there some way to set up commands in Pine to do this? Gwen *** Gwen Morse (egoldmooneachna@yahoo.comet) wrote in comp.mail.pine t...

What is the best way to use PHP to "reload" web page?
I am trying to code my "notfound.html" page when people click on the link that will send them back to home page, that the "entire" browser is "refreshed". Reason for doing this. I have frames on the home page. When user click on the link on "notfound.html", the home page appears within the home page frame. So I see 2 home pages. I have to physically click on the "reload" button on the browser to the the appearance that I want. But I know that "common" user will not think of that, and will determin that the home page is buggy. Any help is greatly appreciated...thanks in advance! Gil On 14-Aug-2003, Gil <gilbertn@biolok.com> wrote: > I am trying to code my "notfound.html" page when people click on the > link that will send them back to home page, that the "entire" browser is > "refreshed". > > Reason for doing this. I have frames on the home page. When user click > on the link on "notfound.html", the home page appears within the home > page frame. So I see 2 home pages. I have to physically click on the > "reload" button on the browser to the the appearance that I want. But I > know that "common" user will not think of that, and will determin that > the home page is buggy. > > Any help is greatly appreciated...thanks in advance! This is an HTML question not PHP, but the answer is to code targ...

TSP or what? Finding "best" "way"
Hi all: I have an algorithmic problem that looks like a TSP: (defpackage #:de.consequor.pib.participant (:nicknames #:ccag.pib.participant) (:use #:cl)) (in-package #:de.consequor.pib.participant) ;;; -------------------------------------------------------------------------- ;;; SPECIAL VARS ;;; -------------------------------------------------------------------------- (defparameter *destinations* (make-hash-table) "Holds all DESTINATIONs created at runtime. A DESTINATION is an application being a participant in the Process Integration Bridge.") (defparameter *mappers* (make-hash-table) "Holds all MAPPERs (functions that map data from one representation to another.") ;;; -------------------------------------------------------------------------- ;;; CLASS IMPLEMENTATION ;;; -------------------------------------------------------------------------- ;;; DESTINATION (defclass destination () ((name :initform nil :initarg :name :accessor name))) (defun register-destination (destination) (setf (gethash (name destination) *destinations*) destination)) (defun make-destination (name) (let ((destination (make-instance 'destination :name name))) destination)) ;;; MAPPER (defclass mapper () ((name :initform nil :initarg :name :accessor name) (from :initform nil :initarg :from :accessor from) (to :initform nil :initarg :to :accessor to) (mapper-...

Best way to "classify" a vector? ("averaging" subsampling)
Hi everyone. Let's suppose to have these two vectors: t=0:0.01:1000; %timestamps val = rand(size(t)); %value associated with each timestamp Now let's suppose I want to calculate the mean value of val in each interval of "t" broad "1". What would be the best way to do it? The dumbest would be something _like_ (I'm sure somebody will find a couple of minor errors :-). But try to get the point!): t2 = ceil (t); [t2,I]= unique (t2,'first'); [t2,J]=unique (t2,'last'); meanVal= zeros(max(t2(:),1); for i=1:numel(meanVal) meanVal(i) = mean(val(I(i):val(J(i)); end Now... I know that matlab always has some built in functions that does all of these basic operations better and faster. So.... what would be a smarter way to do this?? "Luca " <l.presottoRE@MOVE.campus.unimib.NOTit> wrote in message <kh334d$k8h$1@newscl01ah.mathworks.com>... > Hi everyone. > Let's suppose to have these two vectors: > > t=0:0.01:1000; %timestamps > val = rand(size(t)); %value associated with each timestamp > > Now let's suppose I want to calculate the mean value of val in each interval of "t" broad "1". > What would be the best way to do it? > The dumbest would be something _like_ (I'm sure somebody will find a couple of minor errors :-). But try to get the point!): > > t2 = ceil (t); > [t2,I]= unique (t2,'first'); > [t2...

slow mysql "sending data" stage between mysql and php
Hello! I have problem: I have IPB forum installed. After search in IPB (search takes about 3-4 seconds for post table about 300 000 records) mysql shows "Sending Data" status and takes about 3-5 minutes. I tested with PHP 5.2, PHP 4.4, PHP 4.2.3 - with same results. I switched from MySQL 4.2.18 to 4.2.21 and 4.2.22 with same result. I tested with apache module, fastCGI with NGINX web server+fastCGI - same results. I tested mysql connections with socket and network connection. May be I missed some variables from php.ini? May be I missed some from mysql server configuraion? Main question - how I can speedup code for accept "Sending data" stage between PHP and MySQL more fast? ...

"Best" way to "drive" a Python program step by step.
Hi everyone, I'd be interested in hearing suggestions as to the "best" way to drive a Python program step by step from another application. Details: --------- I have implemented a "Robot" that can be programmed by a user to perform certain actions. (see Reeborg below for a simple javascript- based example). For example, part of a typical program might look like: =3D=3D=3D=3D=3D move() turn_left() move() for i in range(2): move() .... =3D=3D=3D I had this working in a desktop based application (see RUR-PLE below), where the user program was executed via exec u...

PHP / Mysql
I am trying to get the next row within a loop for a script i am developing... I need to display a final table row within the table that i have displayed on the page, but i only want to show it if value of the current field is not the same value of the next row. eg: value 1 value 1 value 1 SHOW ROW value 2 value 2 SHOW ROW value 3 value 3 SHOW ROW value 4 value 4 SHOW ROW I have tried mysql_data_seek with very little luck. Any help would be grateful. Craig craig.keightley wrote: > value 1 > value 1 > value 1 > SHOW ROW > value 2 > value 2 > SHOW ROW > value 3 > value 3 > SHOW ROW > value 4 > value 4 > SHOW ROW Thinking laterally, is "SELECT DISTINCT" an option? If not, the basic technique is this: <?php $oldvals = array(); while ($newvals = fetch_row_from_db()) { if ($newvals is different from $oldvals) { print $oldvals; } $oldvals = $newvals; } print $oldvals; ?> You will need to adapt that to your situation. This way, rather than trying to "look ahead" to the next row in the data set, you're actually "printing behind" the previous row. Same effect, but much easier to implement, because the next row is always a mystery, whereas the previous row is already known. -- Toby A Inkster BSc (Hons) ARCS Contact Me ~ http://tobyinkster.co.uk/contact Another way to do it VIA array <?php $vals = array(); while ($temp = fetch_row_from_db()) $vals[$temp[0]] = $temp;...

"10.98" from MySQL shows up as "10.9799995422" in PHP
Hi, This is the first time I am facing this problem and can't figure out WHY is it when I pull data from MySQL, instead of 10.98 from a certain cell, PHP shows "10.9799995422". The cell stores data as a "float" in MySQL. Here is what I do...: $stmt = mysqli_prepare($mysql_db, "SELECT `products`.`price`......................<blah blah>") mysqli_stmt_execute($stmt) mysqli_stmt_bind_result($stmt, $product['price']) print $product['price'] and that's where I get the more decimal places than I should be :) any idea why? THANKS! Mark Livingstone wrote: > Hi, > > This is the first time I am facing this problem and can't figure out > WHY is it when I pull data from MySQL, instead > of 10.98 from a certain cell, PHP shows "10.9799995422". > > The cell stores data as a "float" in MySQL. > > Here is what I do...: > > $stmt = mysqli_prepare($mysql_db, "SELECT > `products`.`price`......................<blah blah>") > mysqli_stmt_execute($stmt) > mysqli_stmt_bind_result($stmt, $product['price']) > print $product['price'] > > and that's where I get the more decimal places than I should be :) > > any idea why? > > THANKS! Because 10.98, like most floating point numbers, cannot be represented exactly in a computer. -- ================== Remove the "x" from my email address Jerry Stuck...

"Best practices" or "Best implementations"?
Hi list, I wonder how to implement OpenSSH the smart way. We have ~70 hosts (AIX 5.2/5.3), several with HACMP using r-tools and Kerberos. The admins connecting via telnet (PuTTY, Exceed, etc.) from their PCs to the servers as root and then mainly su to ora<SID> or <SID>adm (SAP). Main goals: - no direct root login - maybe personalized logins for logging purpose - divide admins in SAP-, Oracle- and Unix-Admin So, there are several possibilities: - ssh from PC to server, personalized accounts, su Control who is doing something - but DISPLAY is "lost", isn't it? - a central host for loggin in and then jump to destination [...] Well, all have its pros and cons. I read SSH from O'Reilly - I don't think I have technical problems, but more organisational problems. I found "Implementing SSH: Strategies for Optimizing the Secure Shell" and "Secure Shell in the Enterprise" at Amazon. Are these good books for answering my questions? So, whats the best way implementing ssh in a server farm? How do you? A further problem is the acceptance by the old admins. ;) cheers, Christoph >>>>> "CW" == Christoph Weizen <cwei@gmx.net> writes: CW> Hi list, I wonder how to implement OpenSSH the smart way. We have CW> ~70 hosts (AIX 5.2/5.3), several with HACMP using r-tools and CW> Kerberos. OpenSSH works smoothly with Kerberos for both server and user authentication. With ticke...

php requires ".php" not ".html" ?
Dumb question -- I know, but... Yes, I searched books and googled but couldn't find the answer. Does php always require that the page be .php and not .html ? Or is this server-dependent? Mine doesn't seem to recognize a php line in a .html page. By the way, how do searchers, eg Google, treat .php? same as .html? Do I lose search position by changing from .html to .php? MasonC masoncXXX@XXXfrontal-lobe.info wrote: > Dumb question -- I know, but... > Yes, I searched books and googled but couldn't find the answer. > > Does php always require that the page be .php and not .html ? > Or is this server-dependent? Mine doesn't seem to recognize a php line in a .html page. > > By the way, how do searchers, eg Google, treat .php? same as .html? > Do I lose search position by changing from .html to .php? > > MasonC It's part of your web server configuration - not PHP. Security conscious hosts will require .php extensions to parse php files. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== At Sun, 06 Jun 2010 14:49:27 -0700 masoncXXX@XXXfrontal-lobe.info wrote: > > Dumb question -- I know, but... > Yes, I searched books and googled but couldn't find the answer. > > Does php always require that the page be .php and not .html ? > Or is this server-dependent? Mine doesn't seem to r...

Problem getting PHP to recognize MySQL, Using PHP 4.3.7 and MySQL 4.0.20
Hi there! I have both PHP 4.0( RPM) installed and MySQL 4.0.20 installed with the mysqld daemon up and running. But when I look at the output of phpinfo() , I do not see it there, which is worrisome and so I tried to recompile PHP and do ./configure with the --with-mysql=path but I don't really know where my mysql's header files should be , is there any way to find that out by using any of the mysql commands? I did try to do ./configure for PHP4 without any parameters and when I looked at the output, I do see that PHP seems to recognize that mySQL is there : .... checking for MSSQL support via FreeTDS... no checking for MySQL support... yes checking for specified location of the MySQL UNIX socket... no checking for MySQL UNIX socket location... /var/lib/mysql/mysql.sock checking for inline... (cached) inline ..... Hence, why is that when I do phpinfo() , mySQL still doesn't show up? I suspect that mysql isn't working correctly with php, because if I use the mysql_connect() function in my php, I get the error "Fatal error: Call to undefined function: mysql_connect() " and yet it DOES seem like PHP recognizes mysql is there. That "unable to recognize mysql_connect function" error comes up after installing PHP using ./configure with or without any parameters. Please help, thanks. I am pretty sure my MySQL is properly installed because I can mysql into the server and set up my database ##-----------------------------------------------...

$TEXTWIDGET get "insert wordstart" "insert wordend" does NOT always return entire work of Cyrillic text.
I,m trying to develop an application to quickly build a trilingual glossary= from a tri-text corpus... three UTF-8 file aligned in parallel in separate= windows... one in English, the next in French and the last in Russian. I'm encountering a problem with a binding designed to return an entire word= following a Double-1 click. Whenever I double click in the Russian text, I= get only part of the word the cursor is over unless the cursor is on the f= irst char of the word when I double click. I've written some test code below which reproduces the behavior I've found = in my application. Please run the script and double-click on an English, French and Russian wo= rd. Note the results depending on where the cursor is located when you clic= k. Please let me know, if you have any ideas about correcting the behavior... = other than the WA I've already found of carefully positioning the cursor on= the first char of a Russian word. Many thanks. #!/bin/sh # \ exec wish "$0" "$@" wm title . wm minsize . 80 48 labelframe .f -text "Test Case" pack .f text .f.t -relief raised -width 80 -height 48 -setgrid true pack .f.t -fill both -expand true bind .f.t <Double-Button-1> {GetInsertAndWord} ..f.t insert 1.0 "This is some English text.\n" ..f.t insert 2.0 "C'est du texte en fran=C3=A7ais.\n" ..f.t insert 3.0 "=D0=AD=D1=82=D0=BE =D1=82=D0=B5=D0=BA=D1=81=D1=...

Best way to get there from here in a parsing sort of way
Hi. I'm trying to figure out the best way to get from here (I face using an environment/scripting language which has file-open, file-save, read-line and write-line capabilities, but I don't think subroutines) to there (where I want to be, that is being able to pick out elements easily from an sql-like document and process it, writing the output to another file). I imagine this involves saving some sort of state and being able to retrieve sections of a line like (get the next string that contains the next parenthesis and its closing mate as start and end) or some such. Thanks Je...

What is best way to implement "tail"?
What is the best way to implement "tail -f" in C or C++ and higher performance compared to either unix shell command "tail -f" or perl File::Tail ? Any suggestion appreciated. Thanks. ...

Best way to "switch arrays"
I'm defining several arrays in the following format: $farmanimals = array('farmanimal1' => 'horse', 'farmanimal2' => 'cow', 'farmanimal3' => 'chicken') $housepets = array('housepet1' => 'dog', 'housepet2' => 'cat', 'housepet3' => 'bird') $zooanimals = array('zooanimal1' => 'monkey', 'zooanimal2' => 'lion', 'zooanimal3' => 'zebra', 'zooanimal4' => 'giraffe') I'm then running through a long text file, and detecting what part of the file I'm in. If I'm in the farm animals section, I want to use the $farmanimals array; if I'm in the house pets section, use the $housepets arra, and so on. Ideally, I may even have a different set of elements and then need to create a variable on the fly to match the element name. Can someone suggest the best method for changing the array to use, without having to script a different loop for each section of the file I'm stepping through? Thanks. J javelin wrote: > I'm defining several arrays in the following format: > > $farmanimals = array('farmanimal1' => 'horse', 'farmanimal2' => 'cow', > 'farmanimal3' => 'chicken') > $housepets = array('housepet1' => 'dog', 'housepet2' => 'cat', > 'housepet3' => &#...

Is there any way to get the state of "toggledesktop" ?
Dear all, I'm currently working on a project in which I need the information of current state of "toggledesktop". For example if the user pressed win+d key to minimize all window, I need to enable some functions in my application. If user pressed win +d key again to restore, I need to enable another functions. Also I need the information of toggledesktop state when this application initialized, so capturing the keystorke in the application may not work. It would be appreciated if anyone has any idea about how to get the current state of "toggledesktop". ...

best way to to a "union" in a table?
I have a data structure that I need to represent in a table. It is a changelist, and the contents of the changelist are either - an existing element in the system, in which case it already has a unique identifier, or a - new element to be added to the system, in which case it does not have an assigned unique identifier, but instead a string identifying a disk file path. What's the best way to represent this as an sql table? The obvious way is something like: changelist_number NUMBER entry_type -- either MODIFY or NEW identifier NUMBER -- if entry_type is MODIFY filepath VARCHAR -- if entry_type is ADD Am I going down the right path? Many TIA! Mark -- Mark Harrison Pixar Animation Studios Mark Harrison wrote: > I have a data structure that I need to represent > in a table. > > It is a changelist, and the contents of the changelist > are either > > - an existing element in the system, in which case it > already has a unique identifier, or a > > - new element to be added to the system, in which case > it does not have an assigned unique identifier, but > instead a string identifying a disk file path. > > What's the best way to represent this as an sql table? > The obvious way is something like: > > changelist_number NUMBER > entry_type -- either MODIFY or NEW > identifier NUMBER -- if entry_type is MODIFY > filep...

PHP/MySQL "UPDATE" question
A beginner in this area, I have been able to read a record from a MySQL database and populate an HTML form (wow!). Now, my goal is to allow the user to edit the contents of the form and then update the record in MySQL. The problem is, as soon as the "Update" button (type="submit") is pressed, all of the data disappear from the form. How can that be prevented? Here is my code: <body> <?php // Select the Music database mysql_select_db("music") or die("Could not connect to Music database"); // Perform SQL query $sql = "select * from cdcollection where Artist = '$txtArtistSearch'"; $result = mysql_query($sql) or die("SQL Select failed"); $row = mysql_fetch_array($result,MYSQL_ASSOC); ?> <?php if ($cmdUpdate) { // Select the Music database mysql_select_db("music") or die("Could not connect to Music database"); $sql = "UPDATE cdcollection SET Notes='$txtNotes' WHERE Artist = '$txtArtistSearch'" ; $result = mysql_query($sql) or die("SQL Update failed"); } ?> <form method="post" action="<?php echo $PHP_SELF;?>"> <p>Artist&nbsp;&nbsp;&nbsp; <input type="text" name="txtArtist" size="19" value="<?php echo $row['Artist'] ?>"> </p> <p>Title&nbsp;&nbsp;&nbsp;&nbsp; <input typ...

Getting the "mysql>" prompt
I installed MySQL4.0. No for creating a databse the help says like go to "mysql>" prompt and then enter some commands. How do I get this prompt ?? On 2 Apr 2006 10:36:39 -0700, techBoy wrote: > I installed MySQL4.0. No for creating a databse the help says like go > to "mysql>" prompt and then enter some commands. How do I get this > prompt ?? Run the mysql command line client. Instructions for how to do that would have been included in the installation and setup instructions you read in order to install it in the first place. -- 83. If I'm eating din...

"emulating" MySQL aes_encrypt() in PHP
mysql> select aes_encrypt('gordan', 'abc'); +------------------------------+ | aes_encrypt('gordan', 'abc') | +------------------------------+ | p��b9??_�?0�?LI� | +------------------------------+ I would like to "emulate" that function in PHP. I know that MySQL AES algorithm is RIJNDAEL_128 so I tried the following code <?php $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC); $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); echo mcrypt_ecb (MCRYPT_RIJNDAEL_128, 'abc', 'gordan', MCRYPT_MODE_CBC, $iv); ?> but the encrypted string is different from the MySQL one :-( and ideas? thanks, gordan Gordan wrote: > mysql> select aes_encrypt('gordan', 'abc'); > +------------------------------+ > | aes_encrypt('gordan', 'abc') | > +------------------------------+ > | p��b9??_�?0�?LI� | > +------------------------------+ > > I would like to "emulate" that function in PHP. I know that MySQL AES > algorithm is RIJNDAEL_128 so I tried the following code > <?php > $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC); > $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); > echo mcrypt_ecb (MCRYPT_RIJNDAEL_128, 'abc', 'gordan', > MCRYPT_MODE_CBC, > $iv); > ?> > > but the encrypted string is different from the MySQL one :-( &...

"Best" way to run on Windows XP
Is the "best" way to run emacs on Windows XP to use the Native XP build or the Cygwin? By "best" I mean: stable, able to run elisp code from emacs.sources, and able to effectively use external tools like grep, diff, etc... ? c I almost forgot the most important thing I'll be using emacs for: doing LaTeX work with AucTeX and refTeX... I can go with either a cygwin build for TeX or something like miktex "Chris Lott" <Chris.Lott@gmail.com> writes: > Is the "best" way to run emacs on Windows XP to use the Native XP build > or the Cygwi...

What would be the best way to "fool" the uname command?
Okay - I am attempting to compile on a shared (virtual host) machine When I use the uname -a command, it displays the following: Linux ps91497 3.1.9-vs2.3.2.5 #1 SMP Thu Jan 26 02:37:05 UTC 2012 x86_64 GNU/Linux /usr/src/linux-source-3.2 is where I downloaded the sources: root@ps91497:/usr/src/linux-source-3.2# dpkg-query -l linux-source Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version ...

MySql and PHP "Using WHERE in a SELECT statememt"
i have a basic php file that is trying to select information from a mysql database. echo "<br>"; include("dbConnect.inc"); $query = "SELECT * FROM client"; $result = mysql_query($query) or die("no select"); $row = mysql_fetch_array($result,MYSQL_ASSOC); while ($row = mysql_fetch_array($result)) { extract($row); echo "Welcome ".$fName." ".$lName." - ".$deptID."<br>"; } this works, but it doesnt return the first record from the table. when i add a WHERE statement, nothing is returned. im using phpMyAdmin to administer mysql. i can get all of the rows from the client table when i browse from phpMyAdmin. also, i can use PEAR database abstraction layer and it retrieves all records and WHERE works in the select. is there a mysql or php setting im missing? im using mysql 4.01 and php 4.3 Ric wrote: > i have a basic php file that is trying to select information from a > mysql database. > > echo "<br>"; > include("dbConnect.inc"); > $query = "SELECT * FROM client"; > $result = mysql_query($query) or die("no select"); > $row = mysql_fetch_array($result,MYSQL_ASSOC); ### get the *FIRST* record into $row > while ($row = mysql_fetch_array($result)) ### get the *SECOND* (or 3rd, 4th, ...) record into $row > { > extract($row); > echo "Welcome "...

"Best" way to determine Option Compare?
Is there any built-in method to determine what Option Compare method is in effect? Right now I'm just doing this (which ignores vbDatabaseCompare, which I never use): If "A" = "a" Then cmp = vbTextCompare Else cmp = vbBinaryCompare End If -- Nationality doesn't determine beauty. On 04/07/2012 23:25, Auric__ wrote: > Is there any built-in method to determine what Option Compare method is in > effect? Right now I'm just doing this (which ignores vbDatabaseCompare, which > I never use): > > If "A" = &...

Web resources about - Best way to get quoted text in mysql? - comp.lang.php

QuotEd ACT Science on the App Store on iTunes
Get QuotEd ACT Science on the App Store. See screenshots and ratings, and read customer reviews.

Sam Johnson quoted, Satya Nadella Microsoft Keynote, SES - Flickr - Photo Sharing!
"The trad of advertising is now so near perfection that it is not easy to propose any improvement." Sam Johnson, quote from The Idler, 1758. ...

Jehovah's Witness abuser quoted scripture while assaulting daughter, royal commission told
As a child growing up in a strict Jehovah's Witness household she was taught to obey her father as head of the family and warned&nbsp;that outsiders&nbsp;were ...

Carr says Romney quoted his 'US in decline' remark out of context
FOREIGN minister Bob Carr says he wasn't criticising America when he spoke of a nation "in decline" during a private conversation with Republican ...


Man accused in B.C. terror plot quoted bin Laden, planned rocket attack
A man accused of plotting to bomb the British Columbia legislature on Canada Day with his wife lamented that the death toll from the Boston Marathon ...

Quick update: Quoted in WSJ on dating apps, recent podcast interview, plus recent essays
... wrote the code for Apollo 11, and designed the Mac Ten classic books that define tech Thanks for reading! The post Quick update: Quoted in ...

Twitterrific adds support for quoted tweets on iPhone & emoji + quick reply on Apple Watch
... its iPhone app and with it come new features for both the Watch and phone. Version 5.12 of Twitterrific adds support for Twitter’s new quoted ...

Stoner Jeff Spicoli Gets Quoted In Brief — Against Sean Penn
Quoting a classic movie stoner against the actor that that played him.

The Most Quoted Experts
Justin Wolfers charts the recent dominance of economists: There’s an old Bob Dylan song that goes “there’s no success like failure,” and it’s ...

Resources last updated: 3/24/2016 7:11:39 AM