Hi,
I have a mySql database i want to display only 10 words from its body field which contain html codes, How i can do that, is there any php function to do that.
I want to set the value of the column 'character_hold' to 'no' for all my rows in my MYSQL database. Is there a SQL statement I can use in phpmyadmin to set them all to 'no'?
excuse my English I speak Spanish
I'm trying to display multiple php and mysql registration, after that the show in an iframe
the problem is that apparently in the iframe shows me errors accents and other characters for example: for example (?D?nde cuesta menos y se consume m?s?")
this is what shows (?)
In the original query or first does not show me that, but in the iframe shows me that error
and probe with http-equiv = "content-type" and I worked
What else I can do?
What should I do?
regards
I have a database in data center, which is running MySQL, and I want to change the database from data center to host in my company. At that time, I don't want to stop the data base in the data center, is there anyway to this kind of integeration? Thank you...
$resultnx = mysql_query("SELECT * FROM `emails` WHERE `email` = '{$email}'");
$num_rows = mysql_num_rows($resultnx);
gets this warning Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in ....
I am a little bit new to the PHP/MYSQL arena, and had an idea to be able to interact with my Database by using a hidden Iframe to run PHP pages in the background(iframe) on events without having to leave the current page?
Good? Bad? Common Practice? Opinions?
Hey Guys,
i have a project table which has a image_id field and a newsimage_id field.
Both are linked to the image table. But InnoDB doesn't allow me to set a foreign key for
both fields to the same column (id).
Is there a way I can do this or is it not possible?
I'm using MySQL through MAMP.
Thanks in advance!!
i am connecting to mysql from excel using odbc. the following illustrates how i am updating the rs
With rs
.AddNew ' create a new record
' add values to each field in the record
.Fields("datapath") = dpath
.Fields("analysistime") = atime
.Fields("reporttime") = rtime
.Fields("lastcalib") = lcalib
.Fields("analystname") = aname
.Fields("reportname") = rname
.Fields("batchstate") = "bstate"
.Fields("instrument") = "NA"
.Update ' stores the new record
End With
the question is why is there a need to run cn.execute after this? havent i already updated the rs with rs.update?
I am confused, I don't know what's wrong. I'm about to transfer all data from my first table to the other. Here is my code:
$getdata = mysql_query("SELECT Quantity, Description, Total FROM ordercart");
while($row = mysql_fetch_row($getdata))
{
foreach($row as $cell){
$query1 = mysql_query("INSERT INTO ordermem (Quantity, Description, Total) VALUES
($cell)",$connect);
}
mysql_free_result($getdata);
}
I get the error: Warning: mysql_fetch_row(): 5 is not a valid MySQL result resource.
Can any one please let me know the best way to use IF statement in mysql query to show if the "email" field is NULL then it should show as "no email"...
Postcode Telephone Email
----------------------------------------------------------
BS20 0QN 1275373088 no email
BS20 0QN 1275373088 no email
PO9 4HG 023 92474208 [email protected]
SO43 7DS 07801 715200 [email protected]
----------------------------------------------------------
I have a table of customers with a 1 recorded against their customerid on different dates.
I would like to find the sum of the 1's recorded in descending order. I'm using MySQL and php
Thanks
i am creating a marks management system using php & mysqlwhere the concerned faculty will be able to login and enter the marks of the students. i can go with a simple table but the problem is there are 288 different subjects for which marks must be entered. So creating a mysql table with so many subjects does not look good for me. please suggest me the best way to manage user permissions so that only the corresponding faculty will be able to enter marks
Is there a simple :) and efficient way or reading very large number of rows sequentially using Zend_Db?
Basically I need to process entire table, row by row. Table is large, primary key sequence is not guaranteed(i.e. not an autoincrement, but is UNSIGNED INT).
What's the best way to approach this?
Environment: PHP 5.2, Zend Framework 1.10, MySQL 5.1
How should I go about adding slashes to only single quotes and ignoring double quotes?
I am using php. I would only like to escape single quotes to prevent my php mysql queries from breaking.
Thank you!
hi,
i am using php,mysql,jquery.
When a user clicks on save i go to back end and save data and show the response. once show the success i need to disable the save button for say 1 min. how do i do it.?
I have CMS table that contain CMS_STARTTIME and CMS_STOPTIME (attachment).
I want to create report to summarize exist data by using Date, Time and Year as Parameter (attachment).
I don't know how to create sql statement to meet this requirement. I'm using MySQL and MS-SQL.
Does one can help?
Thank you very much.
I'm running mysql5 on Mac os x 10.5.8 and got this error.
How do I solve this?
The DB worked fine but stopped working after system update.
I think its something related to the socket file which is /tmp/mysql.sock
do I need to give it special permissions and owner?
Thanks
how do i organize country data (countries, states and cities etc) in mysql?
cause every country has 3 tables: countries, states and cities.
should i have each country in separate set of tables or should i have them all in these 3 tables? if i have all of them in same tables, im afraid that the amount of rows will be huge cause i tend to have a lot of countries!
what is best practice for this?
Hi,
I have two tables table1 and table2, i need to write a select query which will list me the columns that exist in both the tables.(mysql)
I need to do for different tables (2 at a time)
Is this possible?
I tried using INFORMATION_SCHEMA.COLUMNS but am not able to get it right.
Currently I am using mysql to log all traffic from all users coming into a website that I manage. The database has grown to almost 11m rows in a month, and queries are getting quite slow. Is there a more efficient way to log user information? All we are storing is their request, useragent, and their ip, and associating it with a certain website.
What is the best way to store users passwords in a MySQL database using PHP. For example, md5 or is there something better? examples would be much appreciated.
Hi,
I am storing images in mysql Db directly. what is the best way to display the image in good quality (thumbnail and original size images) using php.