Hold carriage returns in PHP MySQL database?
I'm creating a limited news database for a not-for-profit
site and I want to let admin users write a long entry which may
include multiple paragraphs (i.e. carriage returns) and even bold
text for subheadings would be nice. I haven't been able to find out
the proper code and DB settings to allow users to do this.
Anyone have a simple solution?
The way I handle text formatting with dynamic data is to
carefully construct
your DB with formatting in mind
Create separate fields for headlines and copy. When you call
the data to
your web page surround the heading with the desired tag. Of
course you will
not always have a heading, so, to eliminate empty spaces add
a conditional
statement to ignore the field if it is null.
like this:
database:
news_id
news_headline1
news_copy1
news_headline2
news_copy2
web page:
<?php if (strlen($row_getNews['news_headline1']) > 0)
{?>
<h3><?php echo $row_getNews['news_headline1'];
?></h3>
<?php }?>
<p><?php echo $row_getNews['news_copy1'];
?></p>
<?php if (strlen($row_getNews['news_headline2']) > 0)
{?>
<h3><?php echo $row_getNews['news_headline2];
?></h3>
<?php }?>
<?php if (strlen($row_getNews['news_copy2']) > 0)
{?>
<p><?php echo $row_getNews['news_copy2'];
?></p>
<?php }?>
Jeff
"Justin from Indiana" <[email protected]>
wrote in message
news:fiimo4$33$[email protected]..
> I'm creating a limited news database for a
not-for-profit site and I want
> to
> let admin users write a long entry which may include
multiple paragraphs
> (i.e.
> carriage returns) and even bold text for subheadings
would be nice. I
> haven't
> been able to find out the proper code and DB settings to
allow users to do
> this.
>
> Anyone have a simple solution?
>
Similar Messages
-
How to send a number count to the PHP MySQL database everytime a details page is opened from the results page?
Assuming your DB table named 'stats' has fields for article_id, hits and the article id is passed to the detail page through the URL parameter article_id then your query would look like this:
mysql_select_db($database_XXXXXX, $XXXXXX);
if (isset($_GET['article_id'])) {
$article_id = $_GET['article_id'];
$query_hits = sprintf("UPDATE stats
SET hits = hits+1
WHERE article_id = %s", GetSQLValueString($article_id, "int"));
$hits = mysql_query($query_hits, $XXXXXX) or die(mysql_error()); -
Php/MySQL database insert record issue...
I have a php page that adds an "order" to a mysql database table (orders). One text field in the form is for tires/wheels. The description of the wheels often includes the " symbol for inches after a number....Everything submits fine, however when I look at the page that displays the orders all the data after the " symbol including the " symbol is gone... DOes anyone have any idea why this may be happening? It is requiring us to return and edit that area repeatedly. Any help is appreciated greatly. Thanks for your time.
Ok, so just to summarize so I am understanding this correctly. You have an ordering page for tires/wheels. A customer places an order for tires/wheels and the data is submitted successfully and this includes a symbol for measurement (in.). But on another summary page the symbol is returning a blank value.
If this is correct we need to see:
- First, the code that is inserting the symbol to the database table in question
- Second, the query and code where you are printing the data to the screen. -
- How do you refer to an HTML carriage return in PHP?
Someone sent me a php script that replaces foul language with
kinder words
in message board postings. I'd like the same script to weed
out carriage
returns, but we can't find the correct syntax for it.
We're using :
$patterns[0] = '/\n\r/';
What's the correct syntax to use in this situation?
Thanks!"David Powers" <[email protected]> wrote in message
news:[email protected]...
> Reese wrote:
>> "David Powers" <[email protected]> wrote in
message
>>>
>>>$patterns[0] = '/[\n\r]/';
>>>
>>>That searches for either a newline character or a
carriage return.
>>
>> I'm told this will only work in Windows. That Macs
would require a
>> different string. Two, even.
>>
>> Anyone know if this is true?
>
> What you have been told is only partly correct. Windows
uses a carriage
> return followed by a newline character (\r\n). Macs just
use a newline
> character (\n).
>
> The pattern I have given you search for either a newline
character or
> carriage return. So if it's applied in such a way as to
remove all
> instances, it will work on both Windows and Mac. An
alternative pattern
> which would also work on both is this:
>
> $patterns[0] = '/\r?\n/';
>
> It looks for an optional carriage return followed by a
newline character.
> In other words, it still matches if there isn't a
carriage return.
The response of my know-it-all roumanian programmer with an
ego the size of
Texas to that was :
http://www.regular-expressions.info/characters.html
(bottom of the page)
\r\n = windows
\n = Linux (not Mac)
\r = Mac
http://www.regular-expressions.info/optional.html
(tells you what the '?'
does)
(it means that the character before it can be there 0 or 1
times)
\r?\n = \n (Linux) or \r\n (windows)
It leaves out the \r all alone, like added by the Mac.
So, it will not delete the Mac new lines (might delete the
Mac OSX ones
since that one is passed on Linux, but not the older ones.)
Now, you can contradict me all you want and have a busted
code (then you
will say it doesn't work because I made it wrong), or do it
like I told you
and get it working like it should.
To this, I told him I would present this to you for a
rebuttal, but not
before asking him why he used only the '/\r?\n/' model as an
example, and
not the recommended '/[\n\r]/'. Something tells me he has no
idea what [
and ] do in this context, so he's avoiding it altogether --
even though it
may very well solve the problem on its own the way you claim
it does. -
PHP/MySQL field recognize carriage returns?
I'm a novice PHP/MySQL database driven site builder. I need
to have users enter text into a field with carriage returns and
have the database recognize and store those carriage returns so it
displays when the data is displayed on a PHP page.
How do I do this and please keep it simple?
Do I need to use a particular type of MySQL datafield?
Will I be able to use the same code on an "update"
page?quote:
Originally posted by:
geschenk
>>
so it displays when the data is displayed on a PHP page
>>
if you just need to replace the \n - type line breaks
generated by multiline textareas with <br /> on a page, just
use PHP´s native "nl2br"
(new line to break) function:
<?php echo nl2br($row_queryname['field_name']); ?>
That works... sort of...
When I use the update page to modify the entry it puts the
proper "br" code in it's proper place. However when I return to
that page to edit the text again (as my customer likely will), it
displays the "br" code in the text field, and if I submit the
update with the "br" code in place, it duplicates the "br" code
again, so I get double "br" statements. How do I get the update
field to read the "br" code back as carriage returns?
In addition, my insert page uses the following code to write
the original entry, and I'm not sure where to place the "nl2br"
statement in the following query (generated by WebAsssist DW
extensions):
<?php
// WA Application Builder Insert
if (isset($_POST["Insert_x"])) // Trigger
$WA_connection = $nm_connect;
$WA_table = "tb_news";
$WA_sessionName = "WADA_Insert_tb_news";
$WA_redirectURL = "tb_news_Results.php";
$WA_keepQueryString = false;
$WA_indexField = "id";
$WA_fieldNamesStr =
"sort|s_head|s_text|head|subhead|bodytext|photoid|photocaption|name|phone|email|linktitle |linkaddress|show_pfm|show_arch|show_cab";
$WA_fieldValuesStr =
"".((isset($_POST["sort"]))?$_POST["sort"]:"") ."" . "|" .
"".((isset($_POST["s_head"]))?$_POST["s_head"]:"") ."" . "|" .
"".((isset($_POST["s_text"]))?$_POST["s_text"]:"") ."" . "|" .
"".((isset($_POST["head"]))?$_POST["head"]:"") ."" . "|" .
"".((isset($_POST["subhead"]))?$_POST["subhead"]:"") ."" . "|" .
"".((isset($_POST["bodytext"]))?$_POST["bodytext"]:"") ."" . "|" .
"".((isset($_POST["photoid"]))?$_POST["photoid"]:"") ."" . "|" .
"".((isset($_POST["photocaption"]))?$_POST["photocaption"]:"") .""
. "|" . "".((isset($_POST["name"]))?$_POST["name"]:"") ."" . "|" .
"".((isset($_POST["phone"]))?$_POST["phone"]:"") ."" . "|" .
"".((isset($_POST["email"]))?$_POST["email"]:"") ."" . "|" .
"".((isset($_POST["linktitle"]))?$_POST["linktitle"]:"") ."" . "|"
. "".((isset($_POST["linkaddress"]))?$_POST["linkaddress"]:"") .""
. "|" . "".((isset($_POST["show_pfm"]))?$_POST["show_pfm"]:"") .""
. "|" . "".((isset($_POST["show_arch"]))?$_POST["show_arch"]:"")
."" . "|" . "".((isset($_POST["show_cab"]))?$_POST["show_cab"]:"")
$WA_columnTypesStr =
"none,none,NULL|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',n one,''|',none,''|',none,''|',none,''|',none,''|none,none,NULL|none,none,NULL|none,none,NUL L";
$WA_fieldNames = explode("|", $WA_fieldNamesStr);
$WA_fieldValues = explode("|", $WA_fieldValuesStr);
$WA_columns = explode("|", $WA_columnTypesStr);
$WA_connectionDB = $database_nm_connect;
mysql_select_db($WA_connectionDB, $WA_connection);
if (!session_id()) session_start();
$insertParamsObj =
WA_AB_generateInsertParams($WA_fieldNames, $WA_columns,
$WA_fieldValues, -1);
$WA_Sql = "INSERT INTO " . $WA_table . " (" .
$insertParamsObj->WA_tableValues . ") VALUES (" .
$insertParamsObj->WA_dbValues . ")";
$MM_editCmd = mysql_query($WA_Sql, $WA_connection) or
die(mysql_error());
$_SESSION[$WA_sessionName] = mysql_insert_id();
if ($WA_redirectURL != "") {
if ($WA_keepQueryString && $WA_redirectURL != ""
&& isset($_SERVER["QUERY_STRING"]) &&
$_SERVER["QUERY_STRING"] !== "" && sizeof($_POST) > 0) {
$WA_redirectURL .= ((strpos($WA_redirectURL, '?') ===
false)?"?":"&").$_SERVER["QUERY_STRING"];
header("Location: ".$WA_redirectURL);
?> -
Any problem with a single MySQL database used on more than one site?
I have a set of multiple sites hosted separately I'm working on. I'd like to set up a PHP/MySQL database on one site, and be able to pull data from it for completely separate sites. Seems like it shouldn't be a problem. Are there any problems with doing this I need to be aware of?
I've set up databases on three different hosts, and in all cases I could access the databases from outside the domain of the site itslef. GoDaddy is one of them, they used to restrict it, but now they give you the option when setting up a new database on your account.
-
Stripping variables for carriage returns
Hi all, would appreciate any thoughts on this problem......
Using the Show Me ODBC piece as a guide, I've successfully
imported a table
from an access database. The table comprises three fields
[ID], [Question],
[Response] which are stored as a variable called DB_ODBCData.
This variable
looks something like this:
"1\tQuestion bla bla bla\tResponser bla bla
bla100\r2\tAnother question bla
bla\tAnother response bla bla\r3\Question 3 bla bla........ "
etc etc
I was then able to split this into three separate variables
(eg. varID,
varQuestion, varResponse) by sorting DB_OBDCData as a list.
Everything
looks fine and I'm able to display the correct field in the
correct
variable.
However, if there is a carriage return in the actual field in
the database,
for example.....
Can you confirm the times the following evidence were found:
1) the watch
2) training shoe
....this messes up my variables. It treats the carriage
returns in the
questions as an end of field, consequently (in the example
above) "Can you
confirm...." would be assigned to varQuestion correctly, but
"1) the watch"
ends up in varResponse, and "2) training shoe" ends up in
varID
I have tried to use the Authorware STRIP command to remove
unwanted carriage
returns from the DB_OBDCData variable, but this is
unworkable. It won't
recognise the carriage returns as anything other than "\r",
which
consequently strips away all the field separation and leaves
everything in
one big variable!
Any clues guys as to how I can overcome this problem? I know
the easiest
thing would be to ensure there were no carriage returns in
the actual
database fields, but for other reasons this is impossible to
achieve.
TIA
Reg.You could have just replaced it with something short, like
"~". But
whatever.
"RegTheDonk" <[email protected]> wrote in
message
news:[email protected]...
> Thanks everybody for your help :-)))
>
> Amy, the actual data within the database is inserted "on
the fly" by
> students. Its part of a system that is used for
communicating in critical
> incident simulations - they type in a question which the
"control room"
> answers appropriately. As time and pressure is a factor,
they won't
> adhere
> to any specific rules like not using the carriage
return, or using special
> characters like ~ etc. So Im stuck with what I've got,
> unfortunately....(they won't be to fussed about the
spelling or grammer
> either lol!)
>
> Steve, I'm unable to modify or control the table
structure as the
> databases
> in question are part of a larger, non-open source
programme, specifically
> written for the above purpose. The reason I've been
asked to get involved
> is to make a kind of "3rd party application" where
observers can view the
> communications between students and trainers, to assist
their own
> debriefing
> sessions. The main programme was developed by a company
which offers no
> real support, so its up to the clients to try and make
any improvements on
> the system themselves.
>
> Fortunately, as the first field [ID] always starts with
a number, I tried
> a
> variation of Mike's idea and did a series of REPLACE
statements on the
> variable; eg:
>
> tempString := Replace("\r1", "carriagereturn1",
tempString)
> tempString := Replace("\r2", "carriagereturn2",
tempString)
> tempString := Replace("\r2", "carriagereturn3",
tempString) etc etc,
>
> .... I then STRIPed out all the returns "\r" that were
left, which
> eliminated any returns that the students had typed
themselves....
>
> .... I then re-REPLACEed the "carriagereturn1" with
"\r1" etc.
>
> Its a bit long winded, but blow me - as long as a
student doesn't start an
> input with a number (which should never happen) it
works!
>
> Thanks again everyone for your suggestions....doubtless
I'll be along with
> other problems as this thing gets bigger! lol
>
> Cheers,
>
> Reg.
>
> -
How To Store dom4j.Document Object in MySQL Database?
Hi Everyone, i am currently using dom4j to create an xml document object i wish to hold the object in a mysql database using jdbc, however the document object does not implement serializable, i am having difficulty in storing the document object as a BLOB object within the database, any suggestions?
any help or advice would be greatly appreciated
ThanksConvert the Document object to String and store the XML string in MySQL database.
-
Php/mysql: can't write to mysql database [SOLVED]
I'm writing a login script using php and mysql. I got it to work on my server about a week ago, and then I set up apache, php and mysql on my netbook so that I could take my code with me and test it. Now it doesn't work. My registration script doesn't write to the mysql database but has no errors. Here is register.php:
<?php
define("DB_SERVER", "localhost");
define("DB_USER", "root");
define("DB_PASS", "swordfish");
define("DB_NAME", "users");
define("TBL_USERS", "users");
$connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS) or die(mysql_error());
mysql_select_db(DB_NAME, $connection) or die(mysql_error());
function addUser($username, $password)
global $connection;
$password = md5($password);
echo("adding $username,$password<br />");
$q = "INSERT INTO " . TBL_USERS . " VALUES ('$username', '$password')";
echo("query: $q<br />");
$result = mysql_query($q, $connection);
echo("$result<br />");
if (isset($_POST["reg"]))
addUser($_POST["username"], $_POST["password"]);
echo("<a href='index.php'>click here to login</a>");
?>
<html>
<head>
<title>Register</title>
</head>
<body>
<form method="Post" name="login">
<input type="text", name="username" /> Username<br />
<input type="text", name="password" /> Password<br />
<input type="submit" name="reg", value="Register" />
</form>
</body>
</html>
and here is the output (without the form):
adding lexion,6f1ed002ab5595859014ebf0951522d9
query: INSERT INTO users VALUES ('lexion', '6f1ed002ab5595859014ebf0951522d9')
Also, I tried manually adding the content to the database:
$ mysql -p -u root
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version 5.1.42 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> users
-> INSERT INTO users VALUES('lexion', 'foo')
-> ^D
-> Bye
I would assume that I got something wrong with the last bit, but the php script seems like it should work. Does anybody know why it doesn't?
Last edited by Lexion (2010-01-10 19:04:15)What is wrong with your PHP? Why do you think it is failing? An INSERT query doesn't return anything. Also, it's a good idea to specify which fields you are inserting into, unless you want to have to provide something for every field (tedious for tables with many fields with default values). eg:
$q = "INSERT INTO `" . TBL_USERS . "`(`username`, `password`) VALUES ('$username', '$password')";
As for your experiment with the mysql prompt; queries have to end with a semicolon. PHP is nice and hides that little detail from you.
edit: Also, you're echoing text out before the HTML starts. That won't produce valid HTML. I also noticed a few other things which I corrected; look at my comments:
<?php
define("DB_SERVER", "localhost");
define("DB_USER", "root");
define("DB_PASS", "swordfish");
define("DB_NAME", "users");
define("TBL_USERS", "users");
$connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS) or die(mysql_error());
mysql_select_db(DB_NAME, $connection) or die(mysql_error());
function addUser($username, $password)
global $connection;
$password = md5($password);
// echo("adding $username,$password<br />"); - Don't echo stuff before HTML starts.
// Also, clean up user-supplied data before plugging it into a query unless you want to be vulnerable to SQL injection.
$cleanusername = mysql_real_escape_string($username, $connection);
$cleanpassword = mysql_real_escape_string($password, $connection); // Obviously you'd generally use some hashing algorithm like md5 or sha1 for passwords
$q = "INSERT INTO `" . TBL_USERS . "`(`username`, `password`) VALUES ('{$cleanusername}', '{$cleanpassword}')"; // The backticks tell MySQL not to interpret any text within as a keyword (good for field names, eg a field called `date`. The curly brackets tell PHP that the stuff within refers to a variable; it's nice as PHP knows exactly what the variable name is with no possible ambiguity.
// echo("query: $q<br />");
$result = mysql_query($q, $connection);
// echo("$result<br />"); - This won't do anything; in addition to INSERT queries not returning anything, the $result variable doesn't contain the results of the query, it's a pointer to them for use with mysql_result().
?>
<html>
<head>
<title>Register</title>
</head>
<body>
<?php
if (isset($_POST["reg"]))
addUser($_POST["username"], $_POST["password"]);
echo("<a href='index.php'>click here to login</a>");
?>
<form method="Post" name="login">
<input type="text" name="username" /> Username<br />
<input type="text" name="password" /> Password<br />
<input type="submit" name="reg" value="Register" />
</form>
</body>
</html>
<?php
mysql_close($connection); // Not strictly needed, as PHP will tidy up for you if you forget.
?>
Last edited by Barrucadu (2010-01-10 17:34:20) -
Access MySQL Database on Server with PHP Services
Hi there
There are lots of tutorials on how to connect to a MySQL database on your local machine but I'd like to access a database on my server.
When creating a new Flex Project the wizard asks me to define a Web root and a Root URL. I used '/home/ecoflexer/public_html' as Web root and 'http://ecoflexer.com' as Root URL. However, the Web root coudn't be validated. So I've chosen the local folder 'C:\ecoflexer' as Web root. Though it was possibly wrong Flash Builder generated a debug folder at the defined location. After that I went to "Connect to Data/Service" and selected "PHP Service". I tried to generate a sample using the same credentials I use for a standard PHP login script ("Server Port" was left empty). After clicking on "Connect to Database" Zend was installed and returned an error. 'gateway.php' couldn't be found on 'http://ecoflexer.com/testProject-debug/gateway.php'.
So I went into my local Web root and copied the 'testProject-debug' folder to my server to the destination the previous error mentioned. Then another error occured concerning a Zend file. So I went back and copied the whole 'ZendFramework' folder as well to my server. It connects now successfully to my database. I can chose a table but soon after that the introspection of the service fails. I modified the 'amf_config.ini' by adding 'webroot =/home/ecoflexer/public_html' and 'zend_path =/home/ecoflexer/public_html/ZendFramework/library' but it's still not working. Anithing I've done wrong or forgot to do?
Cheers!
ecoFLEXERiam doing client server application,the database is on the server,and iam doing the log in part,so i need to access the database to match the entered user name and password?so i should implement the accessing database part on the server side with the above code,right?i didn't test that i will test it now,but i thought that it's a different way
-
How to get the data from mysql database which is being accessed by a PHP application and process the data locally in adobe air application and finally commit the changes back in to mysql database through the PHP application.
If the data is on a remote server (for example, PHP running on a web server, talking to a MySQL server) then you do this in an AIR application the same way you would do it with any Flex application (or ajax application, if you're building your AIR app in HTML/JS).
That's a broad answer, but in fact there are lots of ways to communicate between Flex and PHP. The most common and best in most cases is to use AMFPHP (http://amfphp.org/) or the new ZEND AMF support in the Zend Framework.
This page is a good starting point for learning about Flex and PHP communication:
http://www.adobe.com/devnet/flex/flex_php.html
Also, in Flash Builder 4 they've added a lot of remote-data-connection functionality, including a lot that's designed for PHP. Take a look at the Flash Builder 4 public beta for more on that: http://labs.adobe.com/technologies/flashbuilder4/ -
Exporting Text data from PHP to Oracle CLOB data (Carriage return - issue)
This is my original text content in PHP - Data type - Longtext
SECTION - 1
This a test description.This a test description.
This a test description.This a test description.
This a test description. This a test description.I exported the above content from PHP as a SQL script file (insert into.. ) - export.sql [ insert into table_name (id, text_content) values (1, '') ]
while exporting data from PHP table into export file.. it replaced the "Carriage return" with "\r\n\r\n" in the insert statement for text_content column
When I run this INSERT statement in Oracle (for longtext, I have created a CLOB column in Oracle), the following text_content data is inserted into CLOB column in Oracle.
SECTION - 2
This a test description.This a test description.\r\n\r\nThis a test description.This a
test description.\r\n\r\nThis a test description.This a test description.Now I have created a item named P1_TEXT_CONTENT of type TEXTAREA and try to fetch the CLOB data into this page item.
BUT textarea displays the entire content including "\r\n\r\n" as mentioned in SECTION - 2
I want to display the content in textarea (item - P1_TEXT_CONTENT) without "\r\n\r\n" same as the original content with "Carriage return" as mentioned in SECTION - 1
What are the options we have?
Thanks,
DeepakDeepakJ wrote:
I want to display the content in textarea (item - P1_TEXT_CONTENT) without "\r\n\r\n" same as the original content with "Carriage return" as mentioned in SECTION - 1
What are the options we have?Run an update on the Oracle table following the inserts to replace the escaped CR/LFs with real ones:
update foo
set clob_column = replace(clob_column, '\r\n', chr(13) || chr(10));You might want to experiment to see which characters are actually necessary. As an OS X/Linux user I'd probably just use a single LF chr(10). -
Submitting Pdf form fields to a MySQL database via PhP
Hi there,
I have recently created a Pdf in Adobe LiveCycle which looks great, and I have added a submit button which is set up to send all the form data in HTML to a PhP file on the server side. The PhP file then collects the form data and inserts it into my MySQL database.
When I run this form from Adobe reader or Professional it works great and the new record is inserted in the database. However I am trying to embed the form into a HTML page, which again looks fine, and all other buttons i.e. Save As, Print work fine.
The submit button however is not working properly now. It inserts a new record into my database, but the fields are blank as if the form data has not been sent or received?
Can you possibly advise me where i'm going wrong.
Much appreciated
CaneHi Cane,
I'm relatively new to creating Adobe Forms but I'm looking to do exactly what you have set up, submitting the results to php which sends the results to a database. I don't like the responses being sent to a pdf response file then every so often you have to export to csv then import the results into a database....too tedious. Can you perhaps provide the code that goes behind the submit button and maybe the code that you use on the php/server side? Again, relatively new to this and don't know where to begin but if I can look at the code behind this it would make things a lot easier.
Thanks,
Ed -
Searching a Mysql Database With PHP and FLEX 2.0
Hi there
I need help with an adobe Flex 2 PHP Mysql project.
This project has a search feature where the user selects
Criteria based on 3 dropdown components that are populated with
dynamic data from PHP MYSQL.
When the user selects these 3 criterias,we would like the
results to be displayed on the flex application under the search
bar,
Please let me know If You would be interested.
I have Adobe Connect,MSN,AIM,SKYPE,YAHOO,etc.
We can offer more work after this job has been completed.
I am an 8 year Internet veteran with a Mass amount of
Work,and projects,for flex.
Please at least email me with any questions,
Thanks
Brandon James Broga
web technologies
[email protected]
aim = brandonjb2008
msn= [email protected]
yahoo = webtechhost...Have you gotten any replies on this yet? If not...I've
been putting small web apps, and web-enabled clients, together
under pressure for nearly 10 years...Mostly
VBscript/Javascript/SQLserver/Oracle, but I can do JSP and have
also dabbled in PHP/MySQL (my
Movies
Database Page is in PHP/MySQL). I've been trying to get some
time to setup a Flex 3 container on my home server, probly I'll use
WebOrb...
Lemme know,
Pudnik -
PHP/MySQL Relational Database
Hi,
I am fairly new to php/MySQL. I am stuck on how to make a cross linking database.
I have two tables "users" and "comments" and would like to set up a page that a logged in user can see and edit the comments they have made.
So far I have tried to make an advanced recordset but all i have managed to do is display all of the records that share a user_id.
I am using dreamweaver CS5.5 and PHP and MySQL.
Thanks in advance for your help
EddieThat should just be a basic query to SELECT * FROM {comment-tbl} WHERE userid = $_SESSION['user'].
Are you using Sessions or Cookies at this point or are you just trying to write this into a query without them?
Maybe you are looking for
-
My iphone 4 is dead after I updated to ios 6.1.3 it doesnt turn on and doesnt respond to itunes also. Visited Apptronix service desk but they say there is nothing they can do about it, and they have charged INR 10640 for a new one. Is there anybody w
-
Screen Sharing: Authentication Failed
Since updating to OS 10.7 on my Mac Mini, I have been unable to log in via Screen Sharing (using my 10.7-installed Macbook). I continually receive the error "Authenticaion failed to 'MacMini'. Please verify you have entered the correct name and pass
-
Blackberry desktop software non vede profilo outlook 2013
BlackBerry Desktop Software, ver. 7.1.0.37 del 13/12/2012 (pacchetto 39) BalckBerry Torch 9860, ver. soft. 7.1 pacchetto 2061 Outlook 2013 di Office Home and Business 2013 64 bit (installato da aggiornamento Office 2010 64 bit) Windows 8 64 bit Preme
-
How to check which column data differs from master table and archive table
Hi All, i have two tables, table a (a1 number,a2 varchar2,a3 varchar2) and table b (b1 number,b2 varchar2,b3 varchar2). how to check the data in both the table are same( including all columns). data in a.a1 is same as b.b1 and a.a2 is same as b.b2 li
-
Minus operator versus 'not exists' for faster SQL query
Hi everybody, Does anyone know if rewriting a query to use the MINUS operator instead of using NOT EXISTS in the query is faster, giving all else is the same? Thanks very much! Bill Loggins 801-971-6837 [email protected]