I need to add extra quotation marks in to the following insert command for mysql.
I need one that is part of the info right before the |$wrapper resend and right after the $outgoing,nobody $query = "insert into majordomoaliases (domain,listname,var,address1,address2)values (/"$domname/",\"$listname\",\"a\",\"$listdomain-$listname:\",\" |$wrapper resend -C $domaincf -l $listname -h $listdomain $listdomain-$listname-$outgoing,nobody\")";
The whole line should look like this when it is printed out to the page it will be written to from the database "|/var/wrapper resend -C /var/domaincf -l list1 -h domain.com domain.com-list1-outgoing,nobody"
I am totaly stuped on haw to add this extra quotation mark no mater what I do I get mysql errors.
hi richard,
take a look at mysql-manual /6 MySQL Language Reference /6.1 Language Structure /6.1.1 Literals: How to Write Strings and Numbers /6.1.1.1 Strings "A `"' inside a string quoted with `"' may be written as `""'."
so for your query:
$query = "insert into majordomoaliases (domain, listname, var, address1, address2) values (\"$domname\", \"$listname\", \"a\", \"$listdomain-$listname:\", \" \"\"$wrapper resend -C $domaincf -l $listname -h $listdomain $listdomain-$listname-$outgoing,nobody\"\"\")";
hth SVEN
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php