Hi, I have a column in my table that stores a string (it is a text column):
varchar(16)
latin1_swedish_ci
The problem is, when I say "ORDER BY name ASC" it returns words starting with an underscore at the end. This is an example it returned:
-a
-mmddd2
-z
-z3
aaa
b
c
t
_a
___-
I bet I can use php to sort, but is there an easy way to...
In awstats I get a table with all the key words and phrases used to find my website. I would like to capture this myself however each search engine url is in a different format. When google is the referer I can use the variable q from the querystring as the search term (e.g. google.com?q=my+keywords) however another search engine may h...
This may sound like a stupid question, perhaps it is. But I'm only trying to make sure there's no secret information hiding from me.
Alright, so if I have the option of putting in extra effort to develop in plain html and hook up my back-end via ajax, do I go for it?
Meaning, I could use PHP/JSP to include files such as headers, footer...
$query1 = "SELECT * FROM idevaff_affiliates";
$affiliateID = mysql_query($query1) or die(mysql_error());
This is my query above - I would like to use it for two WHILE loops
The first one is in the header section - setting up jquery
while($row = mysql_fetch_assoc($affiliateID)){
}
The second is used in a while loop in the body ...
I have a large number of images that I am putting into web pages. Rather than painstakingly enter all of the image attributes, I thought I could write a script that would do the work for me. I just need a little push in the right direction.
I want the script to get the width and height of each image, then format this into an img tag th...
Hello,
I've a weird string escape problem with my PHP script. I'm trying to get data from iSnare and put them into MySQL table.
I'm reading POST data and escaping strings with mysql_real_espace_string() function, also I can insert same data to .txt file without a problem but when I try to insert data into table, it cuts the string from...
I have a result set that I want to filter.
Question is how can I run a query on a result set?
Using PHP and MySQL.
Thanks
...
Hello,
My website is built using php files. I use trade secret algorithms in these files and my root password for my database is stored within these php files also. My database is used to store private medical data of many customers.
Is this considered a secure set up; can anyone download the php source from my webserver, and therefore...
Hello everybody !
I use Codeigniter framework .. and I have a form with input fields , when I want to insert the values of inputs fields into database I use this code :(
function add($tableName)
{
$fieldsData = $this->db->field_data($tableName); // to get all fields name of the table like (id,title,post .. )
foreac...
This might be basic question but how do I create a list of lists in PHP. I would like to perform the following operations:
var x = List(List(1,1,1),List(2,2,2), List(3,3))
echo x[0] //prints List(1,1,1)
echo x[1] //prints List(2,2,2)
x = x.List(4,4,4)
echo x //prints List(List(1,1,1),List(2,2,2), List(3,3),List(4,4,4))
...
if i have a <form action='./search' method='get'> with <input type='text' name='keyword' value='this is the search term' />inside
after submitting the form, it leads me to /search?keyword=this%20is%20the%search%20term
what regex should i use to capture that form of url and rewrite it to /search-this_is_the_search_term
...
I am trying to include a .js file into a php file.
My folder structure looks like this:
root
---js (FOLDER)
------file.js
---blog (FOLDER)
------index.php
------js (FOLDER)
---------blog.js
If I am using this:
<script type="text/javascript" src="../js/blog.js"></script>
it works just fine.
What I can't seem to do is include file.j...
How can you retrieve the value of the rel attribute of a given link and pass it to the handler?
I have a list of links such that
Link list
<div id='one_answer'>Answer1
<a href="$" class="delete_answer" rel='Answer1'>delete</a>
</div>
<div id='one_answer'>Answer2
<a href="$" class="delete_answer" rel='Answer2'>delete</a>
</div>...
I've a site which is running in a shared host without memcached.
So, how about make a MySQL memory DB as object cache just like memcached?
...
Hi actually i want to display ads between my videos. so how to mix multiple video flvs into one stream? I am using wowza streaming server and it's rtmp protocol.
If I had a scenario where I have 2 flv files, can I build a stream, where the first flv plays for a specified number of seconds/minutes and pause then, the second one starts an...
Hello,
I am using a Wordpress blog theme created by someone named Scott Wallick. Here is his website. FYI, I'm using the "Barthelme" theme.
Anyway, this theme prints out the date as follows: August 5, 2009 is displayed as "2009 08 05". I would like to change the display to the following format: 5 Aug 2009.
How do I do this?
I fo...
I"m building a registration form, and I need to validate the user's inputs. (username, email, password).
I have regular expressions set up for each of these, and I can easily validate each in PHP using preg_match, and if it returns false, I can display an error.
However, I think it'd be much nicer if the page did not have to refresh to...
How can I check whether a character is a Unicode character or not with PHP?
...
Hi, when I connect to my database I include('connect.php') the document to connect.
Now I want to do it a bit more safe. Is it possible to check that the one that want to include the connect.php is from my domain. Like:
if($_SERVER["HTTP_REFERER"] == "mydomain.com"){
$link = mysql_connect("localhost","user","password");
mysql_...
Is there a one stop solution to solving all character encoding issues? I always seem to have issues somewhere along the line between user input, database storage and data retrieval (html forms. I want all my data and web pages to be encoded as utf-8 but it seems I always end up with a invalid utf-8 character somewhere.
I don't really u...