MySQL - Rename Column
How to rename mysql column from help to content in my table tbl_help mysql_query("ALTER TABLE tbl_help " . "CHANGE COLUMN help content;"); ...
How to rename mysql column from help to content in my table tbl_help mysql_query("ALTER TABLE tbl_help " . "CHANGE COLUMN help content;"); ...
Possible Duplicate: How to access javascript variable value by creating another variable via concatenation? In PHP I can have: $theVariable = "bigToe"; $bigToe = "is broken"; such that: echo "my ".$theVariable." ".$$theVariable; would display my bigToe is broken How would I go about doing something similar to that in Ja...
Here is my current code: $sql = "SELECT * FROM user_posts"; $result = mysql_query($sql); $row = mysql_fetch_array($result); while ($row = mysql_fetch_array($result)) { print $row['message']; } My goal is to show all of the data in that SQL database through an array. But currently, it only shows the latest one and not...
Hi, Could anyone tell me why my $_SESSION variables are not being carried over to my other PHP page that is called with ajax. All pages have session_start(); It works on my local machine, but when I upload it to my server, it doesn't work, and on refresh it takes me back to the login screen... EDIT: The session variables saved once...
Hi, I'm attempting to install the WP-FacebookConnect plugin for Wordpress using these instructions: == Installation == Copy the plugin to wp-content/plugins/wp-fbconnect under the Wordpress installation. In the Wordpress Admin panel, visit the plugins page and Activate the plugin. the following error message occu...
I want to make some changes to the way I use my CSS. I want to be able to use variables to define colours or something. So I could do the following var red = '#FF0000'; And of course red would be replaced with '#FF0000' where appropriate. How can I do this? I sort of know how, I just don't know the regular expressions or even if this...
I am building an RSS script with mysql, and i dont want an extra field in the database... i want to shrink down the body of the article with a "... Read More" but im not sure how i can limit the number of chars echoed out onto the page? Of course not this syntax, but something along the lines of: echo(limit($row['newsBody'], 1000)); ...
I tried TRAC before and knew how powerful it is But I'm having lots of difficulties to to put it on an online host, it needs lots of resources and can't put it on a regular paid host So I wanted to know if there is a TRAC-Like but written with PHP or something, I need it to have SVN, Wiki, Ticket issuing and maybe Forums ...
I am using PHP and mySQL. I have a table of photographs. in the photographs table I have: a link to the photo, a category_id, date. What would be the best way to list all the categories on the page with the newest 20 photos under each? Right now I am selecting all the photos and then sorting them out after in PHP. If there gets to be 5...
PHP allows me to: Hello, my name is <?php echo $name ?>, and stuff. Is that okay to do instead of Hello, my name is <?php echo $name; ?>, and stuff. I know the <?= ?> is being taken away, is this another one of those shortcuts to be killed? ...
Is there a way to pull images from a directory and place them on a webpage and have links attached to those images that would take a person to a specific webpage associated with that image using PHP? Thanks ...
Hi This is the books table on db; book_ID writer_ID -------- ----------- 1 10 2 10 3 10 4 10 5 10 This is the rates table on the db, book_ID rate ------- -------- 1 4 2 3 2 5 ...
I'm a little confused here. I read some of the earlier questions on https caching but I didnt get a clear answer. I've got a script sitting on: https://www.example.com/main.php It generates an html page that refers to images/css/js resources sitting (relatively) at: /css /javascript /images /a/b/img2 How do I enable caching for these...
I have a class Logger which, among other things has a method Log. As Log is the most common use of the Logger instance, I have wired __invoke to call Log Another class, "Site" contains a member "Log", an instance of Logger. Why would this work: $Log = $this->Log; $Log("Message"); But not this: $this->Log("Message"); The for...
I'm trying to determine whether a string that represents the date and time, given in a JSON Twitter feed is within a range of timestamp columns in MySQL. Here's the example string: 'Sat, 31 Oct 2009 23:48:37 +0000', The +0000 according to the API ( created_at ) indicates it is indeed UTC. Now, I'm using strtotime and date just to con...
I have data coming from my model into this Controller function index() { $this->load->model('work_m'); $data = array(); $config['base_url'] = base_url().'index.php/work/index/'; $config['total_rows'] = $this->db->count_all('work'); $config['per_page'] = '10'; $config['full_tag_open'] = '<p>'; $config['full_tag_close'] = '</p>';...
I am working on reviving an old project (that only works with < 5.1) that essentially compiles PHP 5.3 into a PE C++ EXE. I have gotten everthing to work really well on multiple Windows 7 computers with only 2 dlls and 1 exe for most applications! Unfortunately, on XP I get: the application failed to start because the application con...
I am trying to make it stop showing the rest if $walk_jail is not empty 1) $walk_jail is empty 2) $walk_jail is empty 3) $walk_jail is empty 4) $walk_jail is Not empty Stop showing the rest. $walk = 15; for ( $counter = 1; $counter <= $walk; $counter += 1) { $result= mysql_query("SELECT * FROM walk_txt") or die (mysql_error()); $...
how can i process all radio buttons from the page? <input type="radio" name="radio_1" value="some" /> <input type="radio" name="radio_1" value="some other" /> <input type="radio" name="radio_2" value="some" /> <input type="radio" name="radio_2" value="some other" /> this buttons will be added dynamically so i will not know the radio ...
This is something i have wondered for a while and decided to ask about it. We have the function getmypid() which will return the current scripts process id. Is there some kind of function such as checkifpidexists() in php? I mean a inbuilt one and not some batch script solution. And is there a way to change a scripts pid? Some clarif...