php-general Digest 26 Jun 2013 17:07:21 -0000 Issue 8279
Topics (messages 321493 through 321495):
Problem with variables
321493 by: Fernando A
321494 by: Jim Giner
Reseting the auto-increment number in a MySQL database.
321495 by: Tedd Sperling
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net
To post to the list, e-mail:
php-gene...@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
Hello,
I am working with php and codeigniter, but I have not yet experienced.
I need create a variable that is available throughout system.
This variable contains the number of company and can change.
as I can handle this?
Thank you, very much!
Ferd
--- End Message ---
--- Begin Message ---
On 6/25/2013 5:46 PM, Fernando A wrote:
Hello,
I am working with php and codeigniter, but I have not yet experienced.
I need create a variable that is available throughout system.
This variable contains the number of company and can change.
as I can handle this?
Thank you, very much!
Ferd
One way would be to create a file like this:
<?
// company_info.php
$_SESSION['company_name'] = "My Company";
$_SESSION['company_addr1'] = "1 Main St.";
etc.
etc.
etc.
Then - in your startup script (or in every script), use an include
statement:
<?php
session_start();
include($path_to_includes."/company_info.php");
Now you will have those SESSION vars available for the entire session,
basically until you close your browser.
You can also use the php.ini auto-prepend setting, which automatically
does this for you, altho the vars would not be session vars, since the
prepend-ed file happens before your script issues the session_start (I
think).
--- End Message ---
--- Begin Message ---
Hi gang:
I have a client where their next auto-increment number just jumped from 2300 to
1000000000 for reasons not understood. They want it set back.
Options such as dropping the primary key and rebuilding the index is NOT
possible -- this is a relational table thing.
So, is there a way (programmatically) to set the next number in an
auto-increment?
Something like:
alter table abc auto_increment = 2301;
Any ideas of why this happened?
Cheers,
tedd
_____________________
t...@sperling.com
http://sperling.com
--- End Message ---